withtally / tally-api-quickstart

A cloneable repository for getting started with the new Tally API.
10 stars 2 forks source link

Errors on generation / debugging #1

Open raiseerco opened 1 month ago

raiseerco commented 1 month ago

Running npm run dev gives this output:

 ✔ Load GraphQL schemas
    ✔ Load GraphQL documents
    ✖ GraphQL Document Validation failed with 9 errors;
      Error 0: Unknown type "GovernorSort". Did you mean "GovernorsSortBy", "Governor", "GovernorInput", "GovernorKind", or "GovernorType"?
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:1:72
      Error 1: Unknown argument "chainIds" on field "Query.governors".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:2:13
      Error 2: Unknown argument "pagination" on field "Query.governors".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:2:34
      Error 3: Unknown argument "sort" on field "Query.governors".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:2:59
      Error 4: Cannot query field "id" on type "PaginatedOutput".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:3:5
      Error 5: Cannot query field "name" on type "PaginatedOutput".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:4:5
      Error 6: Cannot query field "tokens" on type "PaginatedOutput". Did you mean "nodes"?
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:5:5
      Error 7: Cannot query field "proposalStats" on type "PaginatedOutput".
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:10:5
      Error 8: Field "governors" argument "input" of type "GovernorsInput!" is required, but it was not provided.
      at /Users/user/Documents/Repo/tally-api-quickstart/src/CodegenQuery/useGovernors.graphql:2:3
BowennCAI commented 1 week ago

I think the document and the repo were not updated in time to be consistent with the website's backend data schema. @raiseerco

raiseerco commented 1 week ago

Indeed, finally what I did is to run an instrospection query to see whatever I need. Basically this:

{
  __schema {
    types {
      name
    }
  }
}

Hope this helps.