0

I use graphql-yoga for server and prisma for GraphQL database on my backend, now I'm looking for local GraphQL database but I couldn't find anything and I'm afraid that there is no local GraphQL database for react-native :(

  • I am not quite sure what you mean with local database but if you are using Apollo maybe apollo-link-state is what you want. – Herku Aug 05 '18 at 10:25
  • @Herku now I need an internet connection to fetch and save data on the server but I would like to make my app working in offline, so I'm looking for local GraphQL database where I can keep data until user has internet connection to save in remote database. –  Aug 05 '18 at 11:03
  • https://github.com/typicode/lowdb Is this what you want? – Lin Du Aug 10 '18 at 05:57

1 Answers1

0

In my research, client side GraphQL is not yet easily supported by any single package.

Hasura has a helpful repo showing how it is possible. The graphql-tools package adds at least ~32kb to your bundle size though. Might be acceptable for React Native.

But then behind this you need to figure out whatever underlying data store you want to use, and you need to wire the data store up to your GraphQL schema yourself.

chmac
  • 11,757
  • 3
  • 32
  • 36