Skip to content

Add support for runtime introspection in GraphQL Data Providers#10444

Merged
slax57 merged 2 commits intonextfrom
ra-data-graphgl-get-introspection
Jan 15, 2025
Merged

Add support for runtime introspection in GraphQL Data Providers#10444
slax57 merged 2 commits intonextfrom
ra-data-graphgl-get-introspection

Conversation

@djhi
Copy link
Contributor

@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
13 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

Development

Successfully merging this pull request may close these issues.

2 participants