react-admin icon indicating copy to clipboard operation
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.

Open andion opened this issue 5 years ago • 4 comments

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:

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

andion avatar Feb 19 '20 12:02 andion

Confirmed, thanks for the details issue!

Kmaschta avatar Apr 07 '20 09:04 Kmaschta

Be aware that there are more incongruences between what ra-graphql-data-simple expects and what json-graphql-server generates.

I realised it afterwards but did not update this issue due to the lack of interest on it. If somebody is interested on fixing not only the README but the schema let me know and I'll try to point the rest of them them out too.

andion avatar Apr 07 '20 15:04 andion

did you have some updates on it?

tafuri-m avatar Jun 16 '21 08:06 tafuri-m

I'm not sure how we should handle this. It would be a breaking change for one of the two packages. Maybe we could add the deleteXXX method to json-graphql-server, without removing the old removeXXX?

djhi avatar Oct 04 '21 14:10 djhi

Done in marmelab/json-graphql-server#190

djhi avatar Feb 18 '25 15:02 djhi

Released in https://github.com/marmelab/json-graphql-server/releases/tag/v3.2.0

djhi avatar Feb 21 '25 08:02 djhi