Recall & Review
beginner
What is REST in web services?
REST (Representational State Transfer) is an architectural style that uses standard HTTP methods like GET, POST, PUT, DELETE to interact with resources identified by URLs. It is simple, stateless, and uses JSON or XML for data exchange.
Click to reveal answer
beginner
What does SOAP stand for and what is its main feature?
SOAP stands for Simple Object Access Protocol. It is a protocol that uses XML to define messages and relies on standards like WSDL for describing services. SOAP supports built-in error handling and is highly extensible.
Click to reveal answer
intermediate
How does GraphQL differ from REST?
GraphQL lets clients request exactly the data they need in a single query, avoiding over-fetching or under-fetching. Unlike REST, which has multiple endpoints, GraphQL uses a single endpoint and flexible queries.
Click to reveal answer
intermediate
Which API style is stateless and which can maintain state?
REST is stateless, meaning each request is independent and contains all needed information. SOAP can maintain state through WS-* standards, allowing more complex operations requiring session management.
Click to reveal answer
beginner
What are the typical data formats used by REST, SOAP, and GraphQL?
REST commonly uses JSON or XML. SOAP strictly uses XML. GraphQL uses JSON for responses and a specific query language for requests.
Click to reveal answer
Which API style uses a single endpoint for all queries?
✗ Incorrect
GraphQL uses a single endpoint to handle all queries, unlike REST which uses multiple endpoints.
Which protocol strictly uses XML for message format?
✗ Incorrect
SOAP strictly uses XML for its message format.
Which API style is known for being stateless?
✗ Incorrect
REST is stateless, meaning each request is independent.
Which API style allows clients to request exactly the data they need?
✗ Incorrect
GraphQL allows clients to specify exactly what data they want in a query.
Which API style commonly uses multiple endpoints for different resources?
✗ Incorrect
REST uses multiple endpoints, each representing a resource.
Explain the main differences between REST, SOAP, and GraphQL in terms of data format, endpoint usage, and state management.
Think about how each handles requests and data.
You got /3 concepts.
Describe a scenario where you might choose GraphQL over REST or SOAP.
Consider client data needs and network efficiency.
You got /3 concepts.