Slide 1

Slide 1 text

Tech talk

Slide 2

Slide 2 text

“ GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data. ” – Taken from Introduction to GraphQL What is GraphQL?

Slide 3

Slide 3 text

What about REST? REST GraphQL Multiple endpoints Single endpoint Fixed response structure(s) Fetch what you need No specification Query language Separate documentation Documented schema HTTP Protocol-agnostic

Slide 4

Slide 4 text

Query language

Slide 5

Slide 5 text

Query language +

Slide 6

Slide 6 text

Specification GraphQL Schema Types Resolvers Mutations Query Scalars Inputs

Slide 7

Slide 7 text

What is a type?

Slide 8

Slide 8 text

What is a query type?

Slide 9

Slide 9 text

What is a mutation type?

Slide 10

Slide 10 text

What is an input type?

Slide 11

Slide 11 text

What are resolvers?

Slide 12

Slide 12 text

What are resolvers?

Slide 13

Slide 13 text

Live coding

Slide 14

Slide 14 text

Silver bullet? - N + 1 problem - Caching - File uploads - Security

Slide 15

Slide 15 text

Resources - Specification: https://graphql.org/ - Apollo GraphQL platform: https://www.apollographql.com/ - Java implementatie: https://www.graphql-java.com/ - Spring boot starter: https://www.graphql-java-kickstart.com/spring-boot/ - My blogpost: https://blog.optis.be/exploring-graphql-3de51e39d707 - Source code: https://github.com/optis/tech-talk-graphql

Slide 16

Slide 16 text

The End