1

I'm using ferry with generated classes for requests, variables, data, etc.

I'm getting an error when I try to run in debug mode that "Error: 'update' is already declared in this scope."

I only have one update mutation and it looks like this:

mutation UpdateHarvestGroup($harvestGroup: UpdateHarvestGroup!) {
  HarvestGroup {
    update(input: $harvestGroup) {
      id
    }
  }
}

This is occurring in my **.data.gql.g.dart file so it's a generated file.

I don't really have much to go on as this was generated from my graphQL schema and queries, which did not present an error before trying to run. Happy to add more detail, just not sure what's relevant. Thanks for the help!

trevhud
  • 13
  • 3

1 Answers1

0

Try renaming your mutation. Ferry creates a method named "update" in the generated code.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 17 '21 at 15:25