https://kotlinlang.org logo
#apollo-kotlin
Title
# apollo-kotlin
j

John O'Reilly

07/11/2022, 5:22 PM
Just updating https://github.com/joreilly/MortyComposeKMM to Apollo 3.4.0 and getting following error
Copy code
extra.graphqls: (36, 30): Unknown argument `field` on directive 'nonnull'
The section it's referring to is as follows....was there change made related to this?
Copy code
extend type Episode @nonnull(field: """
id
name
air_date
episode
characters
created
""")
👀 1
The previous version this was on was
3.3.0
so could be related to change between that and
3.4.0
m

mbonnin

07/11/2022, 5:27 PM
There were definitely changes around this. We used to not validate directives at all and introduced some validation as part of 3.3.1 IIRC
Let me check MortyComposeKMM
You'll need to use
fields
instead of
field
The directive definition is there
Copy code
extend type Episode @nonnull(fields: """
id
name
air_date
episode
characters
created
""")
j

John O'Reilly

07/11/2022, 5:32 PM
ah, nice, thanks....that works now
looks like other ones had
fields
but had typo in this one
m

mbonnin

07/11/2022, 5:33 PM
TLDR: as we add more directives, we'll need to add more validation and also allow renaming them in case of name clash with existing directives
👍 1
4 Views