Skip to content
Graffle is a work in progress. Learn more.

Memory Transport

Graffle has the concept of "transports". A transport is how the request reaches the GraphQL schema for execution. This section is about the "memory" transport.

Overview

The memory transport works with in-memory schemas. It ultimately invokes execute from the graphql package. This transport is used when you instantiate Graffle with a GraphQLSchema.

ts
import { 
Graffle
} from 'graffle'
import {
GraphQLObjectType
,
GraphQLSchema
,
GraphQLString
} from 'graphql'
const
schema
= new
GraphQLSchema
({
query
: new
GraphQLObjectType
({
name
: `Query`,
fields
: {
foo
: {
type
:
GraphQLString
,
resolve
: () => `bar`,
}, }, }), }) const
graffle
=
Graffle
.
create
({
schema
})

Released under the MIT License.