Bird
0
0

Why does GraphQL use a single endpoint instead of multiple endpoints like REST?

easy📝 Conceptual Q2 of 15
GraphQL - Basics and Philosophy
Why does GraphQL use a single endpoint instead of multiple endpoints like REST?
ATo increase the number of URLs clients must know
BTo separate data by resource type
CTo simplify client-server communication
DTo avoid using HTTP methods
Step-by-Step Solution
Solution:
  1. Step 1: Compare GraphQL and REST endpoints

    REST uses multiple URLs for different resources; GraphQL uses one.
  2. Step 2: Understand the benefit of one endpoint

    One endpoint reduces complexity for clients by centralizing requests.
  3. Final Answer:

    To simplify client-server communication -> Option C
  4. Quick Check:

    Single endpoint purpose = Simplify communication [OK]
Quick Trick: Single endpoint reduces client complexity [OK]
Common Mistakes:
  • Believing single endpoint increases URLs
  • Thinking GraphQL avoids HTTP methods
  • Assuming single endpoint separates data by URL

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes