Complete the code to fetch user data with GraphQL.
query { user(id: [1]) { name email } }The user ID must be a string in quotes in GraphQL queries.
Complete the code to request posts with their titles and authors.
query { posts { title [1] { name } } }The field to get the author of a post is usually called 'author'.
Fix the error in the query to avoid requesting too much data.
query { users { id name [1] } }Requesting only the post titles reduces data size and improves performance.
Fill both blanks to limit query results and improve performance.
query { posts(limit: [1]) { title author { name } [2] } }Limiting posts to 5 and requesting only comments text helps keep queries fast.
Fill all three blanks to create an efficient query with filters.
query { posts(filter: { authorId: [1], published: [2] }) { title [3] } }Filtering posts by author ID and published status, and requesting comments text, keeps queries focused and efficient.
