Q1. How does GraphQL differ from REST?
GraphQL exposes a single endpoint and a typed schema rather than many resource URLs. The client sends a query describing exactly the fields it needs, so it avoids the ove...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (10 available).
GraphQL exposes a single endpoint and a typed schema rather than many resource URLs. The client sends a query describing exactly the fields it needs, so it avoids the ove...
- Query: a read operation. Queries can run in parallel and must be side-effect free. - Mutation: a write operation that changes server state. Top-level mutation fields ru...
The schema is the contract between client and server: it declares the types, fields, arguments, return types and nullability that all operations are validated against. Th...
Resolvers run per field. If a list resolver returns N items and a child field resolver loads related data one item at a time, you get one query for the list plus N querie...
A resolver has the signature `(parent, args, context, info)`: - `parent` (also root/value): the object returned by the parent resolver. - `args`: the arguments supplied t...
Two options: - Offset/limit: `orders(offset: 40, limit: 20)`. Easy to implement but unstable when items are inserted or removed and slow at large offsets. - Cursor-based ...
GraphQL usually returns HTTP 200 with a JSON body containing `data` and/or `errors`, because a single operation can partially succeed across fields. ```json { "data": { "...
Authorization belongs in the server layer, never in the client query. Because clients can request any combination of fields, enforce rules at the field and object level, ...
Because clients can compose arbitrarily deep and wide queries, a single request can exhaust the database. Defences: - Limit query depth, for example reject anything deepe...
Federation lets several teams own separate GraphQL subgraphs and compose them into one graph for clients. Each subgraph declares the entities it owns with a key directive...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.