graphql-cli-generate-fragments
graphql-cli-generate-fragments copied to clipboard
Fragment not generated for array fields
trafficstars
I have a schema that has an array field (notificationEmails in the example below). The generated fragment for this schema is missing the field.
Example schema:
type Note {
text: String!
}
type Step {
name: String!
note: Note
notificationEmails: [String!]
}
Generated fragment:
fragment Note on Note {
text
}
fragment Step on Step {
name
note {
...NoteNoNesting
}
}
Is there anything I may be doing wrong here?
👍 I have the same problem with resolver that return union... generated fragments does not contain resolver...
union Note = Headline | Paragraph
type Step {
name: String!
note: Note
notificationEmails: [String!]
}
Generated fragments
fragment Step on Step {
name
notificationEmails
}