0.0.7 • Published 12 months ago

graphql-persisted v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months 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

12 months ago

0.0.6

12 months ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

20.0.0

2 years ago