Given a test server with a simple schema for books and authors, what will be the output of the following query?
{ books { title author { name } } }query { books { title author { name } } }Remember the test server has mock data for books and their authors.
The query requests the book titles and their authors' names. The test server returns both fields correctly.
Consider this mutation to add a new book:
mutation { addBook(title: "Dune", authorId: 3) { id title } }Which option below will cause a syntax error when run on the test server?
Check the commas between arguments carefully.
Option C is missing a comma between arguments, causing a syntax error.
This query fetches all fields of books and authors:
{ books { id title author { id name bio } } }Which option optimizes the query to fetch only necessary fields for a test that checks book titles and author names?
Fetch only fields needed for the test to reduce data size.
Option A fetches only book titles and author names, minimizing data transfer and speeding tests.
Test query:
{ books { title author { name } } }Test server returns author as null for some books. What is the most likely cause?
Check the mock data completeness in the test server.
If mock data lacks author info for some books, author will be null in results.
Choose the best explanation for why integration tests use a test server instead of the real backend.
Think about test reliability and control over data.
Test servers isolate tests from backend changes and provide stable, controlled data for consistent test results.