Prisma1: Adding the same field twice result in internal server error

Created on 8 Sep 2017  路  3Comments  路  Source: prisma/prisma1

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.

bu2-confirmed aremigrations

Most helpful comment

It now throws an error: {Type}: The type {Type} has a duplicate fieldName. So seems solved!

All 3 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dohomi picture dohomi  路  3Comments

jannone picture jannone  路  3Comments

sorenbs picture sorenbs  路  3Comments

hoodsy picture hoodsy  路  3Comments

marktani picture marktani  路  3Comments