Working with forms here, and stuck with a `null` v...
# prisma-whats-new
h
Working with forms here, and stuck with a
null
value issue. GraphQL fives an error with these when trying to insert - what’s the right approach here? Can’t I really update with null values?
n
@hellojere did you try to do it in the Playground?
and it's an optional field I suppose?
h
Not actually. Guess it’s Apollo then.
It’s an optional field indeed.
n
let's see 😛
In our databrowser you can set the field to
null
. I have not actually tried to do it with Apollo yet
yea so it works just fine in the Playground. Can you post the actual network request for the mutation?
and also if you have a more specific error message that would be helpful as well
h
It’s just the Noobie me! Seems to work without
!
after the type declaration in the gql variable definitions
n
oh well
could you still please try to reproduce the problem and send me the error message? We can certainly improve the error message in this case I assume 🙂
h
Sorry, was coding 🙂
GraphQL error: Variable '$client' expected value of type 'String!' but value is undefined. Reason: Expected non-null value, found null.
That’s the error I got. Indeed got rid of it by changing
String!
to
String
n
ahh yea that's actually an Apollo/GraphQL error so not an error message that we can control
thanks for the heads up though 🙂