1

Trying to learn how to use graphql in lwc and looking at the lwc recipes repo.

What I cant find info on is the relevance of the apostrophe after ‘$searchKey:String’ in this recipe. Can anyone please confirm for me so I can move on with my life? 😋

enter image description here

1 Answer 1

2

That means that the field is non-nullable.

See Object types and fields.

3
  • Bah! I wasnt sure what to use to research that. Thanks so much! Commented Jun 19 at 12:18
  • While I wait to select this as best answer (thanks again!), does that mean will error out query if a null is passed in aka is a ‘required’ field? Commented Jun 19 at 12:20
  • I didn't try it myself, but the rationale would be that either the searchContacts would reject the query because the parameter is null or empty, or it would use an empty value instead as a search key (because null isn't a value unless its a 'null' - as a string). I'd suggest you to try yourself and see what happens! :) Commented Jun 19 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .