Passing Argument Values using document literals

We'll cover the following

There are two ways a GraphQL user can provide argument values for an argument:

  1. As document literals
  2. 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:

Get hands-on with 1200+ tech skills courses.