Skip to content
Permalink
Browse files

fix(docs): Add example for other GraphQL servers

  • Loading branch information...
rankun203 committed Jun 12, 2018
1 parent 159495b commit f80882c3ba8818b81989544a4a50b88613a3cda2
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
@@ -32,6 +32,8 @@ yarn add graphql-shield

## Example

### GraphQL Yoga

```ts
import { GraphQLServer } from 'graphql-yoga'
import { rule, shield, and, or, not } from 'graphql-shield'
@@ -136,6 +138,19 @@ const server = GraphQLServer({
server.start(() => console.log('Server is running on http://localhost:4000'))
```

### Others

```ts
// Permissions...
// Apply permissions middleware with applyMiddleware
// Giving any schema (instance of GraphQLSchema)
import { applyMiddleware } from 'graphql-middleware';
schema = applyMiddleware(schema, permissions);
```

## API

### Types

0 comments on commit f80882c

Please sign in to comment.
You can’t perform that action at this time.