GraphQL Examples
The Golden GraphQL API has a testing endpoint at:
https://sandbox.dapp.golden.xyz/graphql
.
See more at Testing Sandbox.Queries and mutations are the two operations allowed in Golden's GraphQL API for retrieving and submitting data to Golden's protocol.
Here are some example queries and mutations:
// Example for finding your account information
// useful for keeping track of your points available to perform actions
query UserInfo {
currentUser {
pointsAvailableForActions
pendingPoints
stakedPoints
remainingSkips
}
}
// Example for retrieving predicates
query MyQuery {
predicates {
edges {
node {
id
name
}
}
}
}
// Example for submitting validation
mutation MyMutation {
createValidation(
input: {tripleId: "0a87e666-34b4-46ba-999a-70ab81b1f781", validationType: ACCEPTED}
) {
validation {
id
}
}
}
Last modified 2mo ago