1. What problem does GraphQL address directly?
- TLS encryption
- Database indexing
- Over-fetching and under-fetching of data
- Container orchestration
जवाब देखें
जवाब: Over-fetching and under-fetching of data
Clients choose the fields.
GraphQL कोर्स के 25 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।
जवाब: Over-fetching and under-fetching of data
Clients choose the fields.
जवाब: It fails validation before execution
The schema is a contract.
जवाब: HTTP caching is harder than with resource-oriented URLs
One endpoint, varied queries.
पाठ: When to Use GraphQL
जवाब: A non-null list whose items are non-null orders
Both the list and its items are non-null.
जवाब: Serially, in the order written
Query fields may run in parallel; mutations run in order.
जवाब: An input type
Inputs are separate from output types.
जवाब: To request the same field more than once with different arguments
Response keys must be unique.
जवाब: In a separate variables JSON object alongside the query
Static query text, dynamic variables.
जवाब: A description of the schema's types and fields, queried through GraphQL itself
Powers tooling and docs.
जवाब: So clients can update their caches without another request
Caches normalise by id.
पाठ: Designing Mutations
जवाब: In the schema, for example as userErrors or a union result type
Expected errors are data.
पाठ: Error Handling
जवाब: WebSockets
Long-lived, two-way connections.
पाठ: Subscriptions
जवाब: The parent object (the result of the enclosing field)
parent, args, context, info.
पाठ: Resolvers
जवाब: The same data can be reached through many nested paths
Protect data where it is resolved.
जवाब: Batches many individual loads into one call and caches them per request
Fixes N+1 queries.
जवाब: The errors array in the response body
Partial errors are common.
जवाब: By type name and id
One copy per object.
जवाब: Typed results and variables for operations, derived from the schema
Compile-time safety.
जवाब: after: the endCursor from the previous page
Opaque cursors mark positions.
जवाब: Accept only pre-registered operations, identified by hash or ID
An allow-list of queries.
जवाब: Many different queries share one endpoint, often sent with POST
Use GET, persisted queries and hints.
पाठ: Caching Strategies
जवाब: Denial of service through deeply nested or very expensive queries
Clients compose arbitrary queries.
पाठ: GraphQL Security
जवाब: Adding a new optional field
Existing queries are unaffected.
पाठ: Evolving the Schema
जवाब: Composes subgraphs into one schema and plans queries across them
One graph, many services.
जवाब: Lists use cursor pagination with a maximum page size
Predictable, safe APIs.