I'm running into the following error when trying t...
# orm-help
m
I'm running into the following error when trying to upgrade to prisma 1.12. So my frontend is sending the following query to my backend.
Copy code
query factoriesQuery($accountId: ID!) {
    factories(accountId: $accountId) {
      ...factoryFields
    }
  }
  
  fragment factoryFields on Factory {
    id
    name
    collections(orderBy: name_ASC) {
      …collectionFields
    }
    toys(orderBy: name_ASC) {
      …toyFields
    }
    categories(orderBy: name_ASC) {
      ...categoryFields
    }
  }
  
  fragment toyFields on Toy {
    id
    name
    category {
      ...categoryFields
    }
  }
  
  fragment categoryFields on Category {
    id
    name
  }
  
fragment collectionFields on Collection {
    id
    name
    toys(orderBy: name_ASC) {
      …toyFields
    }
  }
  
   fragment toyFields on Toy {
    id
    name
    category {
      ...categoryFields
    }
  }
  
  fragment categoryFields on Category {
    id
    name
  }
The backend is throwing the following error:
There can be only one fragment named "categoryFields".,There can be only one fragment named “toyFields”.,There can be only one fragment named "categoryFields".
I’m guessing that this has something to do with graphql-tools.
d
If you think that it is a bug please raise an issue here with all the relevant details https://github.com/prismagraphql/prisma/issues/new?template=bug_report.md If you think that this is a usage issue, please ask it at the forum 🙂 https://www.prisma.io/forum/
It is easy for a conversation to get lost in slack.. persist them accordingly will help us both 🙂