Moved from https://github.com/graphql/graphiql/issues/441
I have an input object that has a list of input objects
mutation createConversation(input: CreateConversationInput!): ConversationMutation
Input Object: CreateConversationInput
messages: [MessageWrapperInput]!
MessageWrapperInput
message: MessageInput
title: TitleInput
Input Object: MessageInput
color: String!
text: String!
Input Object: TitleInput
color: String!
text: String!
The following query is valid according to GraphiQL
mutation {
createConversation(input: {
messages: [
{
message: {
text: “a”
},
message: {
text: “b”
}
}
]}){…
}
}
But I have redefined the message input object in a single list entry.
Expected:
I should get a warning like: "There can only be one input field named message for each list entry"
The correct query for reference should be something like:
mutation {
createConversation(input: {
messages: [
{
message: {
text: “a”
}
},
{
message: {
text: “b”
}
}
]}){…
}
}
How does graphql handle this? Does it report an issue?
I think this bug has been fixed since the version of 14.2.0 of graphql.
Most helpful comment
I think this bug has been fixed since the version of 14.2.0 of
graphql.