DEV Community

Adrian Matei for CodepediaOrg

Posted on • Edited on • Originally published at codepedia.org

GraphQL - where do I start?

It was about time I looked more thoroughly into GraphQL. I must say I felt a bit overwhelmed by the question - "Where do I start?", I mean take a look at the spec... or don't! Not yet.

I had already bookmarked dozens of GraphQL resources, but in this post you will find listed the resources I found most useful to begin with and help you get a good grasp of GraphQL. The order is also important.

1. HowToGraphQL Videos

I would start with the these Youtube videos from HowToGraphQL to get a grasp what GraphQL is all about from a flight altitude.

HowToGraphQL (Fundamentals) - Introduction (1/4)

Learn what GraphQL is, how it compares to REST and about the historic context in which it was created.

HowToGraphQL (Fundamentals) - GraphQL is the better REST (2/4)

Learn about the technical differences between GraphQL and REST and how many common issues with REST APIs can be solved by using GraphQL.

HowToGraphQL (Fundamentals) - Core Concepts (3/4)

Learn about the basic GraphQL language concepts, such as Queries, Mutations, Subscriptions and the GraphQL Schema & SDL.

HowToGraphQL (Fundamentals) - Big Picture (Architecture) (4/4)

Learn about different architectural use cases of GraphQL and the major components on the backend and the frontend, like resolver functions and client libraries.

You can find these videos in the home page from HowToGraphQL.com

2. README file of the spec project on Github

This README walks you through the GraphQL.js reference implementation's type system, query execution, validation, and introspection systems. There's more in both GraphQL.js and specification, including a description and implementation for executing queries, how to format a response, explaining how a type system maps to an underlying implementation, and how to format a GraphQL response, as well as the grammar for GraphQL.

3. https://graphql.org/learn

Read all, and I mean all the articles from Introduction to Best practices.

4. Advanced stuff

Once you are through with the above resources, and you feel more comfortable with GraphQL, you can start with more advanced stuff like

4.1 Pagination

Understanding pagination: REST, GraphQL, and Relay

where some different approaches to pagination in REST and GraphQL are covered:

  • Pagination: what is it for?
  • What are different types of pagination, and when are they useful?
  • What is it like to implement these different types?
  • How does all of this lead to Relay’s pagination spec for GraphQL?
  • Is there a single best solution? (Spoiler alert: no, as always)

Plus extra you get to understand terms like connections, edges from the relay/graphQL world

4.2 Security aspects

Like

  • Route change
  • Introspection
  • Authentication
  • Depth / Complexity
  • Schema generation

presented very nice in
GraphQL Security OWASP YVR 2020

OR

4.3 Error handling

Handling GraphQL errors like a champ with unions and interfaces

An interesting approach to handling errors in GraphQL with the possibilities that the spec provides and still have type safety.

4.4 Caching

GraphQL & Caching: The Elephant in the Room

The author addresses the misconception that "GraphQL breaks caching" and discusses thoroughly the topic.

Bonus - GraphQL Public Bookmarks

You can follow the graphql tag on Bookmarks.dev
to get the latest public entries about GraphQL or search to find resources in combination with other terms
(e.g. graphql and java)

I think the best way to learn something is with hands-on exercise, so in the next article we will do just that.

Top comments (0)