Field can only be defined once graphql

1.2k views Asked by At

I have 2 subgraphs

enter image description here

I have this code in the subgraph for template and fileserver

enter image description here

I call buildFederatedSchema 2 time since I have 2 subgraphs in the server list this the code in modified buildFederatedSchema

enter image description here

gives me this error what should I do?

enter image description here

2

There are 2 answers

0
Ezrqn Kemboi On

If someone have an issue like this one in the future, please check on singular and plural how it is defined in your app.

E.g if I added a collection with name events, then create a mutation called createEvent, I might probably need to make changes to the mutation to be createEvents.

0
LeulAria On

Could be an issue you might have duplicated value on the Graphql definition.

remove on of them

example

query GetUsers {
    users {
       username
       full_name
       full_name # remove duplication
       email      
    }
}