graphql-go-tools

command module
v2.0.0-rc.127 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package graphql-go-tools is library to create GraphQL services using the go programming language.

About GraphQL

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Source: https://graphql.org

About this library

This library is intended to be a set of low level building blocks to write high performance and secure GraphQL applications. Use cases could range from writing layer seven GraphQL proxies, firewalls, caches etc.. You would usually not use this library to write a GraphQL server yourself but to build tools for the GraphQL ecosystem.

To achieve this goal the library has zero dependencies at its core functionality. It has a full implementation of the GraphQL AST and supports lexing, parsing, validation, normalization, introspection, query planning as well as query execution etc.

With the execution package it's possible to write a fully functional GraphQL server that is capable to mediate between various protocols and formats. In it's current state you can use the following DataSources to resolve fields: - Static data (embed static data into a schema to extend a field in a simple way) - HTTP JSON APIs (combine multiple Restful APIs into one single GraphQL Endpoint, nesting is possible) - GraphQL APIs (you can combine multiple GraphQL APIs into one single GraphQL Endpoint, nesting is possible) - Webassembly/WASM Lambdas (e.g. resolve a field using a Rust lambda)

If you're looking for a ready to use solution that has all this functionality packaged as a Gateway have a look at: https://wundergraph.com

Created by Jens Neuse

Directories

Path Synopsis
examples
chat Module
federation Module
kafka_pubsub Module
pkg
ast
Package ast defines the GraphQL AST and offers helper methods to interact with the AST, mostly to get the necessary information from the ast.
Package ast defines the GraphQL AST and offers helper methods to interact with the AST, mostly to get the necessary information from the ast.
astimport
Package astimport can be used to import Nodes manually into an AST.
Package astimport can be used to import Nodes manually into an AST.
astnormalization
Package astnormalization helps to transform parsed GraphQL AST's into a easier to use structure.
Package astnormalization helps to transform parsed GraphQL AST's into a easier to use structure.
astparser
Package astparser is used to turn raw GraphQL documents into an AST.
Package astparser is used to turn raw GraphQL documents into an AST.
astprinter
Package astprinter takes a GraphQL document and prints it as a String with optional indentation.
Package astprinter takes a GraphQL document and prints it as a String with optional indentation.
asttransform
Package asttransform contains a set of helper methods to make recursive ast transformations possible.
Package asttransform contains a set of helper methods to make recursive ast transformations possible.
astvalidation
Package astvalidation implements the validation rules specified in the GraphQL specification.
Package astvalidation implements the validation rules specified in the GraphQL specification.
astvisitor
Package astvisitor enables efficient and powerful traversal of GraphQL document AST's.
Package astvisitor enables efficient and powerful traversal of GraphQL document AST's.
imports
Package imports helps combining multiple GraphQL documents into one document using import comments.
Package imports helps combining multiple GraphQL documents into one document using import comments.
internal/unsafeparser
Package unsafeparser is for testing purposes only when error handling is overhead and panics are ok
Package unsafeparser is for testing purposes only when error handling is overhead and panics are ok
internal/xcontext
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
introspection
Package introspection takes a GraphQL Schema and provides the introspection JSON to fulfill introspection queries.
Package introspection takes a GraphQL Schema and provides the introspection JSON to fulfill introspection queries.
lexer
Package lexer contains the logic to turn an ast.Input into lexed tokens
Package lexer contains the logic to turn an ast.Input into lexed tokens
lexer/identkeyword
Package identkeyword contains all possible keywords for GraphQL identifiers
Package identkeyword contains all possible keywords for GraphQL identifiers
lexer/keyword
Package keyword contains all possible GraphQL keywords
Package keyword contains all possible GraphQL keywords
lexer/literal
Package literal contains a selection of frequently used literals with GraphQL APIs
Package literal contains a selection of frequently used literals with GraphQL APIs
lexer/position
Package position contains the objects and logic to properly describe the position of a token in a GraphQL document
Package position contains the objects and logic to properly describe the position of a token in a GraphQL document
lexer/runes
Package runes contains all possible 'special' runes in a GraphQL document
Package runes contains all possible 'special' runes in a GraphQL document
lexer/token
Package token contains the object and logic needed to describe a lexed token in a GraphQL document
Package token contains the object and logic needed to describe a lexed token in a GraphQL document
middleware
Package middleware contains useful middleware components for GraphQL services, e.g.
Package middleware contains useful middleware components for GraphQL services, e.g.
middleware/operation_complexity
package operation_complexity implements two common algorithms used by GitHub to calculate GraphQL query complexity
package operation_complexity implements two common algorithms used by GitHub to calculate GraphQL query complexity
operationreport
Package operationreport helps generating the errors object for a GraphQL Operation.
Package operationreport helps generating the errors object for a GraphQL Operation.
playground
Package playground is a http.Handler hosting the GraphQL Playground application.
Package playground is a http.Handler hosting the GraphQL Playground application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL