🔥 0
0
Lesson 6 of 6 15 min +200 XP

🧠 GraphQL Assessment

Answer all questions to complete the quiz and earn 200 XP.

1

A mobile app and web app use the same backend. The mobile app needs user name and avatar. The web app needs name, avatar, email, and full address. With REST, what happens?

2

You're building a social media feed. Each post needs author info, comments, and likes. The naive GraphQL resolver makes 1 + N + N + N database calls. What's the solution?

3

Your GraphQL API allows queries like: query { user { posts { comments { author { posts { comments { ... } } } } } } }. What's the security concern?

4

What's the key difference between a Query and a Mutation in GraphQL?

5

In a GraphQL schema, what does 'posts: [Post!]!' mean?

6

Your GraphQL resolver returns: { id: '1', name: 'Sarah', email: 'sarah@test.com' }. The query only requests 'name'. What happens?

7

What are the four arguments passed to every GraphQL resolver?

8

You need to cache GraphQL API responses at the CDN level. What's the challenge?

9

A team is building an internal dashboard that only they use. Data needs are stable and simple. They're debating GraphQL vs REST. What's your recommendation?

10

In DataLoader, why must the batch function return results in the same order as the input IDs?

11

Your GraphQL mutation creates a user and needs to return the created user. What's the best practice?

12

What problem does GraphQL Federation solve?

13

A resolver fetches user data from a REST microservice. The microservice is slow (500ms). What's the impact on a query requesting 10 users' data?

14

What's the purpose of GraphQL Input types?

15

Your team adopted GraphQL 6 months ago. Frontend loves it but backend complains about complexity. What's likely happening?