0.0.7 • Published 2 years ago

graphql-persisted v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

20.0.0

3 years ago