graphql-persisted
v0.0.7
Published
WIP: An Opinionated GraphQL Query Library, with a focus on fully persisted queries
Downloads
26
Maintainers
Readme
graphql-persisted
Note: This package is experimental and not yet intended for any sort of production usage. Still designing the APIs through real world use & experimentation, subject to breakage prior to 1.0
An opinionated GraphQL client, initially focused on:
- Goals:
- Server Persisted Queries
- Type-safety out of the box
- Minimizing GraphQL in the client (no client-side dependency on the "graphql" package)
- Performance, simplicity
- Non-Goals:
- Supporting multiple GraphQL endpoints in the same application
Built atop graphql-normalize
GraphQLQueryCache API:
class GraphQLQueryCache {
//
}
Queries:
const { data } = usePersistedQuery('QueryName', { variables })
usePreloadedPersistedQuery('QueryName', { variables })
Mutations:
const { execute } = usePersistedMutation('MutationName')
Subscriptions:
TODO
Fragments
const unwrappedData = unwrapFragment('FragName', data)
License
MIT