
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@settlemint/sdk-thegraph
Advanced tools
TheGraph integration module for SettleMint SDK, enabling querying and indexing of blockchain data through subgraphs
  
  
    ✨ https://settlemint.com ✨
    
    Integrate SettleMint into your application with ease.
  
The SettleMint TheGraph SDK provides a seamless way to interact with TheGraph APIs for blockchain data indexing and querying. It enables you to easily create and manage subgraphs, define schemas, and query indexed blockchain data using GraphQL from your SettleMint-powered blockchain networks.
The SDK offers a type-safe interface for all TheGraph operations, with comprehensive error handling and validation. It integrates smoothly with modern TypeScript applications while providing a simple and intuitive developer experience.
createTheGraphClient<
Setup>(options,clientOptions?):object
Defined in: sdk/thegraph/src/thegraph.ts:92
Creates a TheGraph GraphQL client with proper type safety using gql.tada
| Type Parameter | 
|---|
| SetupextendsAbstractSetupSchema | 
| Parameter | Type | Description | 
|---|---|---|
| options | { accessToken?:string;cache?:"default"|"force-cache"|"no-cache"|"no-store"|"only-if-cached"|"reload";instances:string[];subgraphName:string; } | Configuration options for the client including instance URLs, access token and subgraph name | 
| options.accessToken? | string | - | 
| options.cache? | "default"|"force-cache"|"no-cache"|"no-store"|"only-if-cached"|"reload" | - | 
| options.instances? | string[] | - | 
| options.subgraphName? | string | - | 
| clientOptions? | RequestConfig | Optional GraphQL client configuration options | 
object
An object containing: - client: The configured GraphQL client instance - graphql: The initialized gql.tada function for type-safe queries
| Name | Type | Defined in | 
|---|---|---|
| client | GraphQLClient | sdk/thegraph/src/thegraph.ts:96 | 
| graphql | initGraphQLTada<Setup> | sdk/thegraph/src/thegraph.ts:97 | 
Will throw an error if the options fail validation against ClientOptionsSchema
import { createTheGraphClient } from '@settlemint/sdk-thegraph';
import type { introspection } from '@schemas/the-graph-env-kits';
import { createLogger, requestLogger } from '@settlemint/sdk-utils/logging';
const logger = createLogger();
const { client, graphql } = createTheGraphClient<{
  introspection: introspection;
  disableMasking: true;
  scalars: {
    Bytes: string;
    Int8: string;
    BigInt: string;
    BigDecimal: string;
    Timestamp: string;
  };
}>({
  instances: JSON.parse(process.env.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS || '[]'),
  accessToken: process.env.SETTLEMINT_ACCESS_TOKEN,
  subgraphName: 'kits'
}, {
  fetch: requestLogger(logger, "the-graph-kits", fetch) as typeof fetch,
});
// Making GraphQL queries
const query = graphql(`
  query SearchAssets {
    assets @fetchAll {
      id
      name
      symbol
    }
  }
`);
const result = await client.request(query);
ClientOptions =
object
Defined in: sdk/thegraph/src/thegraph.ts:27
Type definition for client options derived from the ClientOptionsSchema
| Name | Type | Defined in | 
|---|---|---|
| accessToken? | string | sdk/thegraph/src/thegraph.ts:19 | 
| cache? | "default"|"force-cache"|"no-cache"|"no-store"|"only-if-cached"|"reload" | sdk/thegraph/src/thegraph.ts:21 | 
| instances | string[] | sdk/thegraph/src/thegraph.ts:18 | 
| subgraphName | string | sdk/thegraph/src/thegraph.ts:20 | 
RequestConfig =
ConstructorParameters<typeofGraphQLClient>[1]
Defined in: sdk/thegraph/src/thegraph.ts:12
Type definition for GraphQL client configuration options
constClientOptionsSchema:ZodObject<ClientOptions>
Defined in: sdk/thegraph/src/thegraph.ts:17
Schema for validating client options for the TheGraph client.
We welcome contributions from the community! Please check out our Contributing guide to learn how you can help improve the SettleMint SDK through bug reports, feature requests, documentation updates, or code contributions.
The SettleMint SDK is released under the FSL Software License. See the LICENSE file for more details.
FAQs
TheGraph integration module for SettleMint SDK, enabling querying and indexing of blockchain data through subgraphs
The npm package @settlemint/sdk-thegraph receives a total of 1,777 weekly downloads. As such, @settlemint/sdk-thegraph popularity was classified as popular.
We found that @settlemint/sdk-thegraph demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.