Skip to content

RFC: exchange-graphcache should allow overriding of rootFields names #3821

@ckknight

Description

@ckknight

Summary

In our GraphQL Schema, we have the typical Query and Mutation types, but our root subscription type is named GqlSubscription, because someone in the early stages of the GraphQL API design created their own Subscription type that is unrelated to GraphQL subscriptions.

We want to not have to pass in the full introspection query to the cacheExchange function, which is how the custom GqlSubscription name would be determined.

Proposed Solution

Add a new, optional property to CacheExchangeOpts called rootFields that allows specifying these name overrides

Update Store to observe the new rootFields property, allowing it to still be overridden by schema (if provided).

Requirements

Metadata

Metadata

Assignees

No one assigned

    Labels

    future 🔮An enhancement or feature proposal that will be addressed after the next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions