▸case-01 In Apollo Federation v2, we are defining a User entity in the Users subgraph and want the Orders subgraph to reference User by id. Developers suggest treating User as a non-entity scalar reference in Orders and fetching all user details via REST inside the resolver. How should User be defined in the Orders subgraph schema to enable federation entity resolution? | pass→pass | 11,532 | 7,968 | -31% | 1 | 1 | 0% | 2,583 | 1,683 | -35% | 0 | 0 | — |
▸case-02 When implementing a DataLoader batch loading function for fetching Author records by an array of authorId keys, a developer wants to return a JS object map keyed by ID to make lookup easier. What constraint must the returned array from a DataLoader batch loading function satisfy regarding length and element ordering? | pass→pass | 7,071 | 5,435 | -23% | 1 | 1 | 0% | 1,303 | 1,184 | -9% | 0 | 0 | — |
▸case-03 We are designing the schema for a high-volume social feed posts field. Developers suggest using standard offset and limit parameters (posts(offset: Int, limit: Int): [Post!]!) to simplify the query structure. What schema structure should be used to conform to standard GraphQL cursor-based pagination? | pass→pass | 15,564 | 8,021 | -48% | 1 | 1 | 0% | 1,853 | 1,697 | -8% | 0 | 0 | — |
▸case-04 In Apollo Federation v2, the Shipping subgraph needs to calculate shippingCost for a Product, which depends on weight (a field defined in the Catalog subgraph). Developers suggest forcing client queries to explicitly ask for weight whenever requesting shippingCost. How should the Shipping subgraph schema declare that shippingCost needs weight from the entity context? | pass→pass | 10,599 | 6,725 | -37% | 1 | 1 | 0% | 2,027 | 1,331 | -34% | 0 | 0 | — |
▸case-05 In Apollo Federation v2, both the Users subgraph and the Auth subgraph need to declare and resolve the exact same field isVerified: Boolean! on the User entity type. Without directives, the composition check fails with a field collision error. Which federation directive should be applied to isVerified in both subgraphs to allow shared resolution? | pass→pass | 4,063 | 5,654 | +39% | 1 | 1 | 0% | 793 | 1,242 | +57% | 0 | 0 | — |
▸case-10 A developer creates a DataLoader instance as a global module-level singleton in a Node.js GraphQL server so that cached results persist across different HTTP requests from different users. What security and consistency vulnerability does this pattern introduce, and where should DataLoader instances be instantiated? | pass→pass | 12,280 | 9,224 | -25% | 1 | 1 | 0% | 2,086 | 1,736 | -17% | 0 | 0 | — |
▸case-06 To protect a public GraphQL endpoint from malicious deeply nested queries like author { books { author { books ... } } }, developers propose setting a database statement timeout in PostgreSQL. How should GraphQL query structure validation prevent this security issue before resolvers execute? | pass→pass | 14,857 | 13,268 | -11% | 1 | 1 | 0% | 2,268 | 2,323 | +2% | 0 | 0 | — |
▸case-07 When designing the GraphQL schema for an updateUserProfile mutation, developers propose returning top-level GraphQL execution errors in the errors array for domain validation failures like invalid phone numbers. What mutation payload pattern should be used to handle domain validation failures gracefully? | pass→pass | 10,793 | 9,744 | -10% | 1 | 1 | 0% | 1,998 | 2,043 | +2% | 0 | 0 | — |
▸case-08 We are migrating the resolution of inventoryCount on the Product entity from an old Products subgraph to a new Inventory subgraph in Apollo Federation v2. To avoid downtime during deployment, how can the Inventory subgraph signal to the router that it should take over resolving inventoryCount from Products? | pass→pass | 10,112 | 8,685 | -14% | 1 | 1 | 0% | 1,893 | 1,742 | -8% | 0 | 0 | — |
▸case-09 We need to define a GraphQL query field search(query: String!): [SearchResult!]! that can return User, Post, or Comment objects. Since these concrete types share no common fields, developers suggest returning an object type where all fields are optional. What GraphQL type construct should be used instead? | pass→pass | 5,923 | 5,567 | -6% | 1 | 1 | 0% | 884 | 1,123 | +27% | 0 | 0 | — |
▸case-11 For building a real-time notification system in GraphQL where clients receive instant updates when a new comment is posted, developers suggest using HTTP long-polling against the standard query execution route. What GraphQL operation type and transport mechanism should be implemented for efficient real-time event streaming? | fail→pass | 6,977 | 13,429 | +92% | 1 | 1 | 0% | 1,226 | 2,233 | +82% | 0 | 0 | — |
▸case-12 In a GraphQL schema, event timestamps are defined as standard String scalar fields (createdAt: String!). Clients keep sending malformed date strings like 'yesterday' or '2023/13/45'. How should the schema strictly enforce and validate ISO-8601 formatted date-time values at the GraphQL layer? | pass→pass | 18,190 | 13,461 | -26% | 1 | 1 | 0% | 2,505 | 2,207 | -12% | 0 | 0 | — |
▸case-13 In Apollo Federation v2, a field internalCostCenter on entity Project must be present in a subgraph schema so other subgraphs can reference it, but it must be hidden from the public client-facing supergraph schema. Which directive hides this field from the federated gateway schema? | pass→pass | 3,882 | 4,768 | +23% | 1 | 1 | 0% | 743 | 846 | +14% | 0 | 0 | — |
▸case-14 A GraphQL query has a shallow depth of 3, so depth limiting permits it, but it requests users(first: 100) { orders(first: 100) { items(first: 100) { id } } }, resulting in up to 1,000,000 items. How should the GraphQL server calculate and restrict execution of such heavy queries before processing? | pass→pass | 15,854 | 10,803 | -32% | 1 | 1 | 0% | 2,608 | 2,196 | -16% | 0 | 0 | — |
▸case-15 Mobile clients executing large GraphQL queries via HTTP GET requests hit URL length limits, preventing edge CDN caching. Developers propose converting all queries to HTTP POST payloads, which forfeits HTTP caching. What GraphQL protocol optimization allows sending short identifiers in GET requests while supporting full schema query execution? | pass→pass | 7,965 | 9,806 | +23% | 1 | 1 | 0% | 1,353 | 1,844 | +36% | 0 | 0 | — |
▸case-16 In an Apollo Federation subgraph service, entity extension fields are defined for User, but incoming federated queries requesting fields on User fail to resolve. Which special entity resolver function must be implemented in the subgraph resolver map to handle incoming entity references? | pass→pass | 4,772 | 4,002 | -16% | 1 | 1 | 0% | 815 | 817 | +0% | 0 | 0 | — |
▸case-17 A client queries a GraphQL endpoint for user { profile { name }, orderHistory { id } }. The orderHistory downstream database times out, but profile returns successfully. How does GraphQL handle this execution failure in the HTTP JSON response? | pass→pass | 8,458 | 8,541 | +1% | 1 | 1 | 0% | 1,667 | 1,718 | +3% | 0 | 0 | — |
▸case-18 We need to replace field userPhone with phoneNumber in our GraphQL schema. To avoid breaking legacy mobile application clients currently in production, what schema directive and deprecation workflow should be followed? | pass→pass | 11,388 | 7,193 | -37% | 1 | 1 | 0% | 1,791 | 1,382 | -23% | 0 | 0 | — |
▸case-19 A development team is adding JWT token verification to a GraphQL service. Developers suggest placing jwt.verify() code inside every field resolver function. Where should authentication token verification happen in the request lifecycle, and how should user identity be passed to resolvers? | pass→pass | 11,520 | 10,898 | -5% | 1 | 1 | 0% | 2,131 | 2,238 | +5% | 0 | 0 | — |
▸case-20 We are defining types BlogPost and VideoPost in our GraphQL schema. Both types share exact common fields (id: ID!, title: String!, createdAt: String!, author: User!) alongside their own unique fields. What GraphQL schema type construct should be defined to enforce this shared contract? | pass→pass | 5,050 | 4,961 | -2% | 1 | 1 | 0% | 1,037 | 914 | -12% | 0 | 0 | — |
▸case-21 We are designing a RESTful web service for managing user accounts. A developer asks how to define the OpenAPI 3.0 path and HTTP methods for updating a user's email address and listing user accounts. What are the standard OpenAPI path definitions and HTTP verbs for these REST operations? | pass→pass | 9,695 | 8,590 | -11% | 1 | 1 | 0% | 2,194 | 1,918 | -13% | 0 | 0 | — |
▸case-22 Our PostgreSQL database query SELECT * FROM orders WHERE customer_id = $1 AND status = 'PENDING' ORDER BY created_at DESC is running slowly. How should we create a composite PostgreSQL index to optimize this query execution? | pass→pass | 11,209 | 6,383 | -43% | 1 | 1 | 0% | 1,981 | 1,300 | -34% | 0 | 0 | — |
▸case-23 We need to define a Protocol Buffers v3 .proto file for an internal gRPC service InventoryService with an RPC method GetItem taking ItemRequest and returning ItemResponse. Provide the standard proto3 syntax schema. | pass→pass | 5,122 | 5,333 | +4% | 1 | 1 | 0% | 1,041 | 1,143 | +10% | 0 | 0 | — |