Skip to main content
Module

x/guardenoql/deps.ts

Simple and customizable security middleware for GraphQL servers in Deno.
import * as guardenoql from "https://deno.land/x/guardenoql@v1.0.1/deps.ts";

Classes

A GraphQLError describes an Error found during the parse, validate, or execute phases of performing a GraphQL operation. In addition to a message and stack trace, it also includes information about the locations in a GraphQL document and/or execution result that correspond to the Error.

Schema Definition

Used to construct an HTTP server.

A representation of source input to GraphQL. name and locationOffset are optional. They are useful for clients who store GraphQL documents in source files; for example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might be useful for name to be "Foo.graphql" and location to be { line: 40, column: 0 }. line and column in locationOffset are 1-indexed

TypeInfo is a utility class which, given a GraphQL schema, can keep track of the current field and type definitions at any point in a GraphQL document AST during a recursive descent by calling enter(node) and leave(node).

Variables

The set of allowed kind values for AST nodes.

This set includes all validation rules defined by the GraphQL spec.

Functions

A helper function to build a GraphQLSchema directly from a source document.

Create a GraphQL AST from template literal

Create a new GraphQL HTTP middleware with schema, context etc

Create an Opine application.

Given a GraphQL source, parses it into a Document. Throws GraphQLError if a syntax error is encountered.

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

Implements the "Validation" section of the spec.

Type Aliases

The list of all possible AST node types.

A visitor is provided to visit, it contains the collection of relevant functions to be called during the visitor's traversal.