Skip to main content

programQuery

programQuery(variables, init)

programQuery(variables, init?): Promise<TypedResponse<Response>>

Low-level function for making a programQuery request.

Parameters

variables: Variables

init?: RequestInit

Returns

Promise<TypedResponse<Response>>

Reference

See

Client.getProgram

Example

Simple usage without error handling:

const response = await queries.programQuery({
programId: '6058668928843776'
})
const json = await response.json()
const program = json.data.programById

Source

src/queries/programQuery.ts:143

programQuery(programId, init)

programQuery(programId, init?): Promise<TypedResponse<Response>>

Parameters

programId: ProgramID

init?: RequestInit

Returns

Promise<TypedResponse<Response>>

Example

Alternative usage:

const response = await queries.programQuery(6058668928843776)
const json = await response.json()
const program = json.data.programById

Source

src/queries/programQuery.ts:156