uf0.1.0

Type to search every page and heading. Page titles only, while the full index loads.

All pages

API reference

@uniflowed/graphql

The Relay environment, without the boilerplate, for the Unified Toolchain for Flow.

0.1.04 documented exports, 2 without a doc commentpackages/graphql

Written from the source by uf doc when this site was built: the signature and the comment above each export, grouped by the specifier a program imports it from.

@uniflowed/graphql

type

GraphQlError

export type GraphQlError = {
  readonly message: string,
  readonly path?: $ReadOnlyArray<string | number>,
};

A GraphQL error as a server reports it.

class

GraphQlResponseError

export class GraphQlResponseError extends Error { ... }

Raised when a response carries errors.

type

EnvironmentOptions

export type EnvironmentOptions = {
  /** Where operations are posted. */
  readonly endpoint: string,
  /**
   * The fetch client to post with.
   *
   * Explicit rather than reaching for a global: uf does not override
   * `globalThis.fetch`, and a server rendering a request often needs to forward
   * that request's credentials, which a global cannot know about.
   */
  readonly fetch: FetchClient,
  /** Headers sent with every operation, e.g. an authorization token. */
  readonly headers?: { readonly [string]: string },
};

How to reach the GraphQL endpoint.

function

createEnvironment

export function createEnvironment(options: EnvironmentOptions): Environment { ... }

A Relay environment that posts operations to endpoint.

The store is fresh, so two calls are two independent caches — which is what a server needs, where one environment per request is the only way two users do not see each other's data.

Without a doc comment