Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add an example GraphQL data provider #7602

Merged
merged 3 commits into from
Apr 29, 2022
Merged

[Doc] Add an example GraphQL data provider #7602

merged 3 commits into from
Apr 29, 2022

Conversation

fzaninotto
Copy link
Member

We'll reintroduce the ra-data-graphql and ra-data-graphql-simple packages soon. In the meantime, the docs should make it clearer that developers can also implement their own GraphQL data provider by hand.

Note: the code snippet is tested against a real Hasura instance. Fun fact: GitHub Copilot wrote about 80% of its code.


Let's say that you want to map the react-admin requests to a REST backend exposing the following API:


### getList
**getList**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because when typing 'getList' in the search, this section returns, and because it appears in the side navigation for nothing (the important part is the implementation)

@djhi djhi merged commit e0131ba into master Apr 29, 2022
@djhi djhi deleted the graphql-by-hand branch April 29, 2022 13:02
@fzaninotto fzaninotto added this to the 4.0.2 milestone Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants