Table of contents
Methods
Properties
constructor
• new QueryClient(environment): QueryClient
Create a new QueryClient instance
Parameters
| Name | Type | Description |
|---|---|---|
environment | SpaceportChainType | Chain environment (e.g., “local”, “devnet”, “testnet”) or SpaceportSDK instance |
Returns
QueryClient
Methods
getEnvironment
▸ getEnvironment():SpaceportChainType
Get the current environment
Returns
SpaceportChainType
getGraphQLClient
▸ getGraphQLClient():Client
Get the GraphQL client
Returns
Client
executeQuery
▸ executeQuery<T, V>(query, variables?): Promise<T>
Execute a GraphQL query
Type parameters
| Name | Type |
|---|---|
T | T |
V | extends Record<string, unknown> = Record<string, unknown> |
Parameters
| Name | Type | Description |
|---|---|---|
query | string | The GraphQL query document |
variables? | V | Query variables |
Returns
Promise<T>
The query result
Properties
graphqlClient
• graphqlClient:Client
environment
• environment:SpaceportChainType
listings
• listings:ListingsQueryModule
agreements
• agreements:AgreementsQueryModule
smartLicenses
• smartLicenses:SmartLicensesQueryModule
