Pluralsight: GraphQL: The Big Picture 2019 Flashcards
02 What is GraphQL / 03 What is GraphQL?
What is GraphQL?
GraphQL is a query language for your API.
02 What is GraphQL / 05 Rest vs. GraphQL
Compare GraphQL and REST.
- Multiple round trips (REST) vs one single request (GraphQL).
- Over fetching and under fetching (REST) vs tailor made queries (GraphQL).
- No need to expose new API when UI refactor is needed.
03 GraphQL Core Concepts / 01 Types
What are two main types in GraphQL?
- Query
- Mutation
03 GraphQL Core Concepts / 04 Queries - Alias
What is an alias?
You can’t query for the same field with different arguments. Aliases let you rename the result of a field with anything you want.
03 GraphQL Core Concepts / 05 Queries - Fragments
What are fragments?
Fragments are GraphQL’s reusable units. They let you build sets of fields and then include them in multiple queries.
03 GraphQL Core Concepts / 07 Mutations
How query and mutation fields are executed?
Query fields are executed in parallel, mutation fields run in series, one after the other.
05 GraphQL Ecosystem and Tooling / 02 GraphQL Client
What GraphQL Client can do? (6 items)
- Communicate with server (sent requests and receive responses)
- Integrate with view components and updates the UI
- Cache query results
- Handle errors and validate schema
- Provide local state management
- Provide pagination
05 GraphQL Ecosystem and Tooling / 03 GraphQL Server
What are resolvers?
Resolver function is a function that resolves a value for a type/field in the GraphQL Schema.
05 GraphQL Ecosystem and Tooling / 03 GraphQL Server
4 responsibilities of GraphQL Server
- Schema and Resolver Functions
- Network Layer
- GraphQL Execution Engine
- Batched Resolving