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

Add support for runtime introspection in GraphQL Data Providers #10444

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jan 13, 2025

Problem

See #9403
A GraphQL backend may support functionality that extends beyond the default Data Provider methods. One such example of this would be implementing GraphQL subscriptions and integrating ra-realtime to power realtime updates in your React-Admin application. However, graphql dataFrovider implementations can't have access to the introspection made by ra-data-graphql and may have to reimplement the same logic.

Solution

  • Update ra-data-graphql so that the dataProvider has a getIntrospection method allowing custom implementations to leverage the introspection.
  • Update ra-data-graphql so that the dataProvider has a client property allowing custom implementations to access the Apollo client easily whether it was provided or created by ra-data-graphql.

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
    - [ ] The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

@djhi djhi added the RFR Ready For Review label Jan 13, 2025
@slax57 slax57 self-requested a review January 14, 2025 14:49
@slax57 slax57 merged commit b605d16 into next Jan 15, 2025
15 checks passed
@slax57 slax57 deleted the ra-data-graphgl-get-introspection branch January 15, 2025 10:40
@slax57 slax57 added this to the 5.5.0 milestone Jan 15, 2025
@fzaninotto fzaninotto changed the title Allow graphql dataProviders to leverage the introspection results Add support for runtime introspection in GraphQL Data Providers Jan 20, 2025
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