Which solution meets the need to unify multiple data fields in a single request while allowing clients to request specific fields in a GraphQL environment? Select the BEST answer.
A message bus that republishes broad data sets whenever a field is changed
A method that relies on remote procedure calls for each data request
A pattern that uses multiple endpoints with distinct field definitions for each resource
A design that uses a schema to retrieve targeted data from a single endpoint
A single schema approach is correct because it defines available data segments and supports requesting only the fields needed. This design prevents retrieving unneeded data and consolidates various resources into one endpoint. Using multiple endpoints or remote procedure calls complicates requests, and a message bus that republishes broad data sets lacks a schema for field-level control.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a schema in GraphQL?
Open an interactive chat with Bash
Why is using a single endpoint beneficial in a GraphQL environment?
Open an interactive chat with Bash
How does GraphQL avoid over-fetching and under-fetching data?