ChilliCream / graphql-workshop

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

error after step 3 - using v12 #81

Closed pjirsa closed 3 years ago

pjirsa commented 3 years ago

The updated "complete" sample code shows using v12. However, when I get the following error after adding the dataloader classes in step 3.

{
  "errors": [
    {
      "message": "There was no argument with the name `speaker` found on the field `sessions`.",
      "locations": [
        {
          "line": 4,
          "column": 5
        }
      ],
      "path": [
        "speakers",
        0,
        "sessions"
      ],
      "extensions": {
        "fieldName": "sessions",
        "argumentName": "speaker"
      }
    }
  ]
}
pjirsa commented 3 years ago

I was able to resolve this issue by updating my resolver to include the [Parent] attribute as outlined in the v11 -> v12 migration guide.

Would be nice if the step-by-step code was updated to reflect the same version as the completed example.