Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/perminder-klair/contentful-graphql

Contentful GraphQL allows you to query your data stored in Contentful with GraphQL
https://github.com/perminder-klair/contentful-graphql

api cms contentful expressjs graphql

Last synced: 17 days ago
JSON representation

Contentful GraphQL allows you to query your data stored in Contentful with GraphQL

Awesome Lists containing this project

README

        

# Contentful GraphQL

Contentful GraphQL allows you to query your data stored in [Contentful](https://www.contentful.com/) with [GraphQL](http://graphql.org/). A schema and value resolvers are automatically generated out of an existing space.

Generated artifacts can be used with any node-based GraphQL server. The outcome of the project's main function call is an instance of the [`GraphQLSchema`](http://graphql.org/graphql-js/type/#graphqlschema) class.

### Run it locally

To run it, clone the repository, install dependencies and start a server:

```
npm install
npm start
```

Use to query the data from within your application and navigate to to use the IDE (GraphiQL) for test-querying.

To use your own Contentful space, you have to provide:

- space ID
- CDA token
- CMA token

Please refer the ["Authentication" section](https://www.contentful.com/developers/docs/references/authentication/) of Contentful's documentation.

You can provide listed values with env variables:

```
SPACE_ID=some-space-id CDA_TOKEN=its-cda-token CMA_TOKEN=your-cma-token npm start
```