My react-admin imp seems to be able to connect to a strapi api I've spun up and configured with the graphql plugin, but I get an error saying my client essentially doesn't know one of my strapi collections exists:
Unknown resource 'products'. Make sure it has been declared on your server side schema. Known resources are
That's the full message that appears in a flash. No actual list of resources.
My App.js is the following:
class App extends Component {
constructor() {
super();
this.state = { dataProvider: null };
}
componentDidMount() {
buildGraphQLProvider({
clientOptions: {
uri: 'http://localhost:1337/graphql',
},
}).then(dataProvider => {
this.setState({ dataProvider })
}).catch((err) => {
console.error(err);
});
}
render() {
const { dataProvider } = this.state;
if (!dataProvider) {
return <div>Loading</div>;
}
return (
<Admin
authProvider={authProvider}
dataProvider={dataProvider}
i18nProvider={i18nProvider}
title="GridPlus"
locale="en"
customRoutes={[
<Route
exact
path="/custom"
component={CustomRouteNoLayout}
noLayout
/>,
<Route exact path="/custom2" component={CustomRouteLayout} />,
]}>
<Resource name="products" {...products} />
</Admin>
);
}
}
export default App;
Any ideas why admin-client isn't able to see my products collection?
Thanks.