Complete the code to search for all items with the keyword "GraphQL".
query { search(text: "GraphQL") { __typename [1] } }title which may not exist on all types.id which is less descriptive for search results.The name field is common across types and used to identify items in search results.
Complete the code to include the description field in the search results.
query { search(text: "GraphQL") { __typename name [1] } }summary which may not be defined in the schema.content which might be too long or detailed.The description field provides a brief explanation of the item and is useful in search results.
Fix the error in the fragment usage to fetch the author name.
query { search(text: "GraphQL") { __typename ... on Article { title author { [1] } } } }fullname which is not defined.authorName which is not a valid field.The name field is the correct field to get the author's name in the schema.
Fill both blanks to fetch the title and the published date for BlogPost type in search results.
query { search(text: "GraphQL") { __typename ... on BlogPost { [1] [2] } } }author which is not requested here.summary which is not the published date.The title and publishedDate fields are used to show the blog post's name and when it was published.
Fill all three blanks to fetch the name, description, and URL for Repository type in search results.
query { search(text: "GraphQL") { __typename ... on Repository { [1] [2] [3] } } }stars which is not requested here.The name, description, and url fields provide the repository's basic info and link.