UNPKG

@miragejs/graphql

Version:

A library for handling GraphQL requests with Mirage JS

13 lines (12 loc) 747 B
import { RelayConnection } from "../relay-pagination.js"; import type { QueryArgs, ResolverContext } from "../@types/index.js"; import type { GraphQLObjectType, GraphQLResolveInfo } from "graphql"; /** * Resolves a field that returns a Relay connection type. It determines the type * of records to fetch and filter from Mirage's database and builds a list of * edges and page info for the connection. * * @see {@link https://relay.dev/graphql/connections.htm#sec-Connection-Types} * @see {@link https://graphql.org/learn/execution/#root-fields-resolvers} */ export declare function resolveRelayConnection(source: any, args: QueryArgs, context: ResolverContext, info: GraphQLResolveInfo, connectionType: GraphQLObjectType): RelayConnection;