Client(opts: ClientOptions): Client
opts: ClientOptions
The shared core for the highly customizable and versatile GraphQL client
Client(opts: ClientOptions): Client
opts: ClientOptions
The Client is the central hub for your GraphQL operations and holds urql's state.
operations$: Source<Operation>
Exposes the stream of Operations that is passed to the Exchange pipeline.
reexecuteOperation(operation: Operation): void
Dispatches an Operation to the Exchange pipeline, if this Operation is active.
subscribeToDebugTarget(onEvent: (event: DebugEvent) => void): Subscription
Subscribe method to add an event listener to debug events.
createRequestOperation<Data = any,Variables extends AnyVariables = AnyVariables,>(kind: OperationType,request: GraphQLRequest<Data, Variables>,opts?: Partial<OperationContext> | undefined,): Operation<Data, Variables>
Creates an Operation from a GraphQLRequest and optionally, overriding OperationContext options.
executeRequestOperation<Data = any,Variables extends AnyVariables = AnyVariables,>(operation: Operation<Data, Variables>): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the Operation and issues OperationResults for this Operation.
query<Data = any,Variables extends AnyVariables = AnyVariables,>(): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL query operation created from the passed parameters.
readQuery<Data = any,Variables extends AnyVariables = AnyVariables,>(): OperationResult<Data, Variables> | null
Returns the first synchronous result a Client provides for a given operation.
executeQuery<Data = any,Variables extends AnyVariables = AnyVariables,>(query: GraphQLRequest<Data, Variables>,opts?: Partial<OperationContext> | undefined,): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL query operation for the passed GraphQLRequest.
subscription<Data = any,Variables extends AnyVariables = AnyVariables,>(): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL subscription operation created from the passed parameters.
executeSubscription<Data = any,Variables extends AnyVariables = AnyVariables,>(query: GraphQLRequest<Data, Variables>,opts?: Partial<OperationContext> | undefined,): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL subscription operation for the passed GraphQLRequest.
mutation<Data = any,Variables extends AnyVariables = AnyVariables,>(): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL mutation operation created from the passed parameters.
executeMutation<Data = any,Variables extends AnyVariables = AnyVariables,>(query: GraphQLRequest<Data, Variables>,opts?: Partial<OperationContext> | undefined,): OperationResultSource<OperationResult<Data, Variables>>
Creates a Source that executes the GraphQL mutation operation for the passed GraphQLRequest.
https://urql.dev/goto/docs/architecture/#requests-and-operations-on-the-client for more information
on what the Client is and does.
Add Package
pnpm i jsr:@urql/core
pnpm dlx jsr add @urql/core
Import symbol
import { Client } from "@urql/core";
Add Package
yarn add jsr:@urql/core
yarn dlx jsr add @urql/core
Import symbol
import { Client } from "@urql/core";
Add Package
vlt install jsr:@urql/core
Import symbol
import { Client } from "@urql/core";
Add Package
npx jsr add @urql/core
Import symbol
import { Client } from "@urql/core";
Add Package
bunx jsr add @urql/core
Import symbol
import { Client } from "@urql/core";