InterviewStack.io LogoInterviewStack.io

Frontend Backend Integration Through APIs Questions

Understanding how frontend components interact with backend APIs using HTTP requests (fetch, axios, etc.), handling asynchronous responses and errors, managing data flow from API responses to UI updates. Ability to design APIs that frontend needs and implement corresponding client-side code to consume them properly.

EasyTechnical
50 practiced
You're designing backend endpoints for a full-stack application. For each of these operations state the most appropriate HTTP status code and explain why: 1) Successfully created a new resource when client supplied valid data, 2) Successfully deleted a resource and response has no body, 3) Request accepted for asynchronous processing, 4) Client supplied syntactically valid JSON that fails semantic validation, 5) Client attempted to create a resource that conflicts with an existing unique constraint, 6) Authentication required, and 7) Authenticated but not authorized for the requested action. Also explain idempotency considerations for the HTTP methods involved.
MediumTechnical
56 practiced
Implement a cursor-based paginated endpoint in Node/Express using PostgreSQL for a messages table with columns (id UUID, created_at timestamptz, content text). Explain the SQL query for loading older messages (load more), how to construct a safe opaque cursor token (e.g., base64), and how the client should handle cases where messages are deleted between pages.
MediumTechnical
53 practiced
Design and describe both backend API and frontend behavior to implement optimistic UI updates for a 'like' toggle on posts. The client should immediately reflect the new state, send the API request to /api/posts/:id/like, handle rollback if the request fails, and the backend must be idempotent and return the canonical like count. Show endpoint design (method, body, response) and client pseudocode that handles optimistic state, temporary IDs, and reconciliation.
MediumTechnical
50 practiced
A dashboard frontend must fetch nested data from multiple services (users, posts, comments) with flexible fields. Evaluate choosing GraphQL vs adding composite REST endpoints. Discuss frontend efficiency, backend complexity, caching difficulties, authorization nuances, and the N+1 query problem. For GraphQL, propose mitigations for the N+1 problem and for REST, propose composite endpoint patterns.
MediumTechnical
58 practiced
Implement an API rate-limiting strategy for a Node/Express backend that enforces per-user quotas for authenticated requests and per-IP quotas for unauthenticated traffic. Describe the middleware design, the store you would use for counters, the headers to return (X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After), and the recommended frontend behavior (UI messaging, disabling buttons, exponential backoff).

Unlock Full Question Bank

Get access to hundreds of Frontend Backend Integration Through APIs interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.