GraphQL client for apps using Parse Server
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

GraphQL client for apps using Parse Server

Build Status Code Climate Test Coverage Dependency Status devDependency Status

When to use

  • you are using Parse SDK (web or mobile) coupled with Parse Server
  • you are using GraphQL
  • you want to make sure your GraphQL queries are authenticated using Parse authentication
  • [Recommended] you are also uing parse-graphql-server package

Quick start

Install parse-graphql-client and make sure Parse JavaScript SDK is installed and configured

npm install --save parse-graphql-client parse

Create and configure and instance of GraphQLClient.

Note: GraphQLClient expects you to specify which Parse module to use. Example below uses a React Native version of Parse. If you are using GraphQLClient in a node environment, you would use require('parse/node'), while a browser based app would call for require('parse')

import GraphQLClient from 'parse-graphql-client';

const client = new GraphQLClient(settings.graphqlURL, require('parse/react-native'));

    todos {
      id, text, isComplete
`).then(result => {

return client.mutate(`
    newTodo: addTodo(text:"buy milk") {
      id, text, isComplete
`).then(result => {

All resulting requests to your GraphQL server will arrive with Authorization header set to current Parse session token. You can either take it from there, or use parse-graphql-server package to automate this even further.

See it in action


Parse GraphQL client relies heavily on Lokka from Kadirahq.