As a user I would like to save GraphQL Fragments as standalone documents, then reference those fragments in other queries without needing to include the full fragment. At run-time, the server would be able to use the referenced global fragment.
For example, I could save the following Document:
fragment PostData on Post {
id
title
}
Then I should be able to run a query like so:
{
posts {
nodes {
...PostData
}
}
}
and even though the fragment isn't defined inline in the query document, it would still be a valid query because the fragment is a global fragment.
see: wp-graphql/wp-graphql#2979
As a user I would like to save GraphQL Fragments as standalone documents, then reference those fragments in other queries without needing to include the full fragment. At run-time, the server would be able to use the referenced global fragment.
For example, I could save the following Document:
Then I should be able to run a query like so:
{ posts { nodes { ...PostData } } }and even though the fragment isn't defined inline in the query document, it would still be a valid query because the fragment is a global fragment.
see: wp-graphql/wp-graphql#2979