For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
snippet:read
Get snippets
Query
Variables
Get a snippet by ID
Query
Variables
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetch snippets by ID or as a paginated collection.
snippet:readquery getSnippets($first: Int = 50, $after: String) {
snippets(first: $first, after: $after) {
edges {
node {
id
name
text
markdown
path
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
{
"first": 50
}
query getSnippet($snippetId: ID!) {
snippet(snippetId: $snippetId) {
id
name
text
markdown
path
}
}
{
"snippetId": "sn_01HXXXXXXXXXXXXXXXXXXXXXXX"
}
Was this page helpful?
