Passing Argument Values using document literals
There are two ways a GraphQL user can provide argument values for an argument:
- As document literals
- As variables
Using literals
When we use document literals, values are embedded directly inside the GraphQL document. It’s a straightforward approach that works well for static documents. Here’s a query that uses a document literal for the matching argument that we’ve added to retrieve menu items whose names match reu
:
Access this course and 1400+ top-rated courses and projects.