react-admin
react-admin copied to clipboard
The GraphQL schema ra-graphql-data-simple expects and the one that json-graphql-server generates are different. The README says otherwhise.
What you were expecting:
I was expecting that ra-graphql-data-simple
would accept the GraphQL schema generated by marmelab/json-graphql-server as is stated in the README
What happened instead:
The schema ra-graphql-data-simple
expects and the schema that json-graphql-server
generates are different.
The problem seems to be the "remove/delete" operation:
- react-admin expects:
deletePost(id: ID!): Post
- json-graphql-server generates:
removePost(id: ID!): Boolean
Related code:
-
The README of
ra-graphql-data-simple
where it shows the expected schema. -
The README of
json-graphql-server
where it shows the generated schema. -
The code of
ra-graphql-data-simple
that confirms that it expectsdeleteResource
as the default name for the DELETE operation. Also, it seems it only returns the id as the response, and not the whole object. The test confirms all this. -
The code of
json-graphql-server
that confirms that it is generated asremoveResource
. And the test that confirms it.
Other information:
This issue seems related : https://github.com/marmelab/react-admin/issues/2663
Environment
- react-admin version: 3.2.0
- json-graphql-server version: 2.1.3