Issue by marktani
_Wednesday Aug 30, 2017 at 13:35 GMT_
_Originally opened as https://github.com/graphcool/api-bugs/issues/248_
What is the current behavior?
Adding the same field twice at the same time result in internal server error.
Please share the relevant part of your GraphQL schema and all functions, permissions or other project settings for easier reproduction
Add the same field twice to an existing type:
type Item {
# ...
# new:
test: String
test: String
}
Apply changes. You'll receive an internal server error, and no test
field has been added.
What is the expected behavior?
Either an error message, or the field test
added once.
Comment by kbrandwijk
_Wednesday Aug 30, 2017 at 13:46 GMT_
I'd vote for an error message. Either the schema is 100% correct, and changes will be applied, or it isn't. I would consider it a bad thing if the system starts 'thinking' for itself about how to correct my mistakes :smile:
@do4gr Did we solve this already?
It now throws an error: {Type}: The type {Type}
has a duplicate fieldName. So seems solved!
Most helpful comment
It now throws an error: {Type}: The type
{Type}
has a duplicate fieldName. So seems solved!