Back to Chainlink

README

deployment/environment/web/sdk/README.md

2.45.11.1 KB
Original Source

GQL SDK

This package exports a Client for interacting with the feeds-manager service of core. The implementation is based on code generated via genqlient.

Structure

client/          # Client interface, implementation, and types
internal/        # GraphQL queries/mutations and generated code
  genqlient.graphql
  generated/

Prerequisites

Extending the Client

If your feature requires new GraphQL operations, add queries or mutations to genqlient.graphql and then regenerate the implementation via the Taskfile:

bash
$ task generate

Next, extend the Client interface and the client implementation.

If your feature composes existing operations (e.g. filtering or combining results from already-generated queries), you can extend the Client interface and implementation directly without modifying genqlient.graphql or regenerating.

Usage

See devenv/don.go and keystone/scripts/main.go for real-world usage examples.