Skip to content

Instantly share code, notes, and snippets.

@merlox
Created January 11, 2023 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merlox/0fdd54b10cced0cc64f6bc32170b5b9a to your computer and use it in GitHub Desktop.
Save merlox/0fdd54b10cced0cc64f6bc32170b5b9a to your computer and use it in GitHub Desktop.
await client.query({
opportunities: [{
first: 100,
}, {
farm: {
slug: true,
logo: true,
},
totalValueLocked: true,
tokens: {
rewards: {
displayName: true,
}
},
apr: true,
}]
})
@merlox
Copy link
Author

merlox commented Jan 11, 2023

The error is:

/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/dist/client/getFieldFromPath.js:31
            throw new Error("type `".concat(type.name, "` does not have a field `").concat(f, "`"));
                  ^

Error: type `Query` does not have a field `opportunities`
    at /Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/getFieldFromPath.ts:34:23
    at Array.forEach (<anonymous>)
    at getFieldFromPath (/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/getFieldFromPath.ts:11:8)
    at parseRequest (/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/generateGraphqlOperation.ts:43:35)
    at /Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/generateGraphqlOperation.ts:93:24
    at Array.map (<anonymous>)
    at parseRequest (/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/generateGraphqlOperation.ts:92:8)
    at generateGraphqlOperation (/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/generateGraphqlOperation.ts:131:18)
    at Object.query (/Users/merunas/Desktop/projects/defi-dashboard/node_modules/@gqlts/runtime/src/client/createClient.ts:59:59)
    at _callee3$ (/Users/merunas/Desktop/projects/defi-dashboard/server.js:110:30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment