Skip to content

Cannot have two graphQL methods that return the same object type in the same file #1821

@Swahvay

Description

@Swahvay

If I create a custom graphQL object type for a return on a function, I cannot use it for two functions within the same file (or maybe globally too?). If I do I get the following error when running codegen:

Error 
  template: schema.tmpl:9:4: executing "schema.tmpl" at <reserveImport $typ.ImportPath $typ.Type>: 
  error calling reserveImport: HorseCompetitionWatchType is already imported from path
  src/graphql/generated/mutations/watch_horse_in_competition_type. duplicate path:
  src/graphql/generated/mutations/unwatch_horse_in_competition_type @ file 
  src/graphql/generated/schema.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions