9 Using GraphQL APIs without a client library
This chapter covers
- Analyzing UI components to determine their GraphQL data requirements
- Performing Ajax POST requests for GraphQL operations
- Using tokens in request headers to identify the API consumer
- Using fragments to make every UI component responsible for its own data requirements
- Using GraphQL features to simplify and generalize the UI code
In the last chapter, we finished the implementation of the AZdev GraphQL API service. It’s now time to explore how to use that API practically in a frontend web application.
When it comes to using GraphQL in web applications, you can use it either directly with a simple Ajax library (like axios
or fetch
) or with a fully featured GraphQL client (like ...
Get GraphQL in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.