graphql

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

assembler/graphql

This directory contains the GraphQL definition for the server-side of the "Refactoring the GUAC Assembler" project.

Note: This is still in experimental state and might change in the future!

GraphQL server configuration

  • gqlgen.yml: the configuration file for gqlgen to generate Go code from GraphQL schema specification
  • schema/: the GraphQL schema from which the codegen starts

GraphQL server code generation

  • graphql.go: Mostly empty, contains load bearing comment to make sure Go code is generated by go generate ./... whenever schema changes
  • generated/: Contains files generated by go generate ./... that represents the internals of the GraphQL interface, as defined by gqlgen (marshalling, unmarshalling, type checking, etc.)
  • resolvers/: contains resolvers for GraphQL queries. These should be editable whenever the schema changes. Of particular interest is resolvers/resolver.go, the root resolver definition, which links to the backends via Backend.
  • model/nodes.go: Contains Go structures that correspond to the GraphQL interface types. Use these in resolvers. Not recommended to directly depend on these from the rest of GUAC, use client GraphQL instead.

GraphQL Examples

  • examples: queries used to test the backend, from the playground

GraphQL Helpers

  • helpers: utility functions used within the graphql resolvers

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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