urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.6k stars 448 forks source link

feat(core/graphcache): Add support for client-side-only directive processing #3317

Closed kitten closed 1 year ago

kitten commented 1 year ago

Summary

When applied, this change alters formatDocument to return a FormattedNode type mapping. This maps GraphQL AST nodes and specifically:

This will allow us to implement client-side directives in Graphcache as well as stabilise formatDocument to do more advanced processing of GraphQL ASTs.

Set of changes