Guides

Schema

  • Definition Defining your schema

  • Introspection GraphQL has an introspection system that tells about the schema.

  • Generators Use Rails generators to install GraphQL and scaffold new types.

  • Testing Techniques for testing your GraphQL system

  • Class-based API Define your GraphQL schema with Ruby classes (1.8.x alpha releases)

  • Dynamic definition You can define your schema dynamically based on other data

  • Lazy Execution Resolve functions can return "unfinished" results. GraphQL will defer finishing them until other fields have been resolved.

  • Limiting Visibility Flag types and fields so that only some clients can see them.

  • Root Types Root types are the entry points for queries, mutations and subscriptions.

Queries

Types

Type Definitions

  • Objects Objects expose data and link to other objects

  • Scalars Scalars are "simple" data types like integers and strings

  • Enums Enums are sets of discrete values

  • Input Objects Input objects are sets of key-value pairs which can be used as field arguments.

  • Interfaces Interfaces are lists of fields which objects may implement

  • Unions Unions are sets of types which may appear in the same place (but don't share fields).

  • Lists Ordered lists containing other types

  • Non-Null Types Values which must be present

  • Extending the GraphQL-Ruby Type Definition System Adding metadata and custom helpers to the DSL

  • Resolvers Reusable, extendable resolution logic for complex fields

Authorization

  • Overview Overview of GraphQL authorization in general and an intro to the built-in framework.

  • Visibility Programatically hide parts of the GraphQL schema from some users.

  • Accessibility Reject queries from unauthorized users if they access certain parts of the schema.

  • Authorization During execution, check if the current user has permission to access retrieved objects.

  • Pundit Integration Hook up GraphQL to Pundit policies

  • CanCan Integration Hook up GraphQL to CanCan abilities

  • Scoping Filter lists to match the current viewer and context

Fields

Mutations

Errors

Relay

Subscriptions

GraphQL Pro

GraphQL Pro - OperationStore

  • Overview Learn how persisted queries work and how OperationStore implements them.

  • Getting Started Add GraphQL::Pro::OperationStore to your app

  • Client Workflow Add clients to the system, then sync their operations with the database.

  • Server Management Tips for administering persisted queries with OperationStore

  • Access Control Manage authentication & visibility for your OperationStore server.

JavaScript Client