Skip to content
Discussion options

You must be logged in to vote

While digging through the source code, I found an undocumented option: possibleTypes. It can be used to enable deterministic fragment matching without passing a schema, thus disabling all other features of schema awareness. This is exactly what I was looking for.

It is possible to test out the option with this function:

/**
 * Generates a PossibleTypesConfig from a GraphQL introspection schema.
 *
 * This function extracts abstract type (UNION and INTERFACE) to concrete type
 * mappings from the introspection schema, allowing Graphcache to match
 * fragments deterministically without heuristic fragment matching.
 *
 * @param introspectionSchema - The introspection schema containing __sche…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hendrikniemann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant