ChilliCream / graphql-workshop

Getting started with GraphQL on ASP.NET Core and Hot Chocolate - Workshop
465 stars 199 forks source link

Relay ID error " has an invalid format." #24

Closed eduardo-baptista closed 3 years ago

eduardo-baptista commented 3 years ago

Hello,

I'm following the tutorial and during step 4 in the part that adds relay support to the schema I'm getting the error The ID 1 has an invalid format.

I tried with the provided code but got the same error.

My query is:

{
  node (id: "1") {
    id
    ... on Speaker {
      bio
    }
  }
}

and

{
  speaker (id: 1) {
    bio
  }
}
Saulasii commented 3 years ago

I've also run into this issue, both from copying the structure in my own project and cloning this repository and running the project. Are the docs correct in saying that non-relay Ids are accepted, or should we just be using Relay ids?

michaelstaib commented 3 years ago

Only relay ids are accepted once we opt into relay ... however ... we soon will update the serialization to also allow clear ids here. :D