All Projects → oslabs-beta → Anagraphql

oslabs-beta / Anagraphql

Programming Languages

javascript
184084 projects - #8 most used programming language

What is anagraphql?

Anagraphql an express middleware package that can be used to analyze graphQL queries before they interact with a database.

Installation

To install anagraphql, run the following command in the terminal:

npm i anagraphql

Getting started

To use anagraphql in your application, require it into the file where you're setting up your server.

const anagraphql = require('anagraphql');

From there, add anagraphql to your app.use function, as you would with any other middleware function. To render the anagraphql interactive playground, set graphiql equal to true, as shown below:

app.use('/graphql',
  anagraphql({
    schema,
    rules,
    anagraphqlPlayground: true
  }),
  graphqlHTTP({
    schema,
  }));

Anangraphql Interactive Playground

More soon...

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].