filmov
tv
Spring Boot GraphQL Tutorial #3 - Schema Design Best Practices
Показать описание
When you create your schema is it crucial that you follow some best practices.
With all APIs, it is extremely important to have descriptive names. But with the nature of the graphql schema and evolution, one would argue that it is even more crucial.
Simply, create a naming convention and place it in a doc :) .
Wrapper types will allow your schema to freely evolve, makes changes in a backwards compatible way and we do not need to worry about our clients migrating to new types.
For example, If you have a field "userId", when you decide you require more user information, you will typically need to create a new type that contains the userId and your new fields. Here we need to deprecate userId and wait until all clients migrate over to the new type. Then clean-up userId. If you created a user type from the start, you could freely add new fields without planning backwards compatible changes.
It is important to note, this is not a hard rule. Please be pragmatic :)
“Public APIs are forever, ONE chance to get it right. “
Cheers!
Philip
With all APIs, it is extremely important to have descriptive names. But with the nature of the graphql schema and evolution, one would argue that it is even more crucial.
Simply, create a naming convention and place it in a doc :) .
Wrapper types will allow your schema to freely evolve, makes changes in a backwards compatible way and we do not need to worry about our clients migrating to new types.
For example, If you have a field "userId", when you decide you require more user information, you will typically need to create a new type that contains the userId and your new fields. Here we need to deprecate userId and wait until all clients migrate over to the new type. Then clean-up userId. If you created a user type from the start, you could freely add new fields without planning backwards compatible changes.
It is important to note, this is not a hard rule. Please be pragmatic :)
“Public APIs are forever, ONE chance to get it right. “
Cheers!
Philip
Spring Boot GraphQL Tutorial #3 - Schema Design Best Practices
Spring Boot and GraphQL Tutorial | 2024
Spring Boot GraphQL Tutorial - Part 3 Consume API using Android App
Master Graphql with Spring Boot 🔥🔥
GraphQL Explained in 100 Seconds
Spring Boot GraphQL Part 2 - GraphQL Types, Schema & Query Mapping
🍃 Introduction to Spring GraphQL with Spring Boot
Graphql Query, Mutation, Subscriptions in Spring Boot 3
Spring Boot GraphQL Tutorial #2 - Creating your first Schema and Query
Spring Boot GraphQL Tutorial: How to test your GraphQL APIs
Spring Boot GraphQL Tutorial #14 - DataFetchingEnvironment
Spring Boot GraphQL How to secure your GraphQL APIs in Java
Spring Boot GraphQL Tutorial #33 – Subscription with Reactor
Building a GraphQL API with Spring Boot | Spring with GraphQL
🔥 Mastering GraphQL & Spring Boot APIs | Real-world Example | @Javatechie
Create a GraphQL Client in Java with Spring Boot
GraphQL Spring Boot - How to get started with Spring for GraphQL
Spring Boot GraphQL Tutorial #18 - Input Validation (Method 1 - Bean)
GraphQL Spring Boot #5 - Setting up a Spring Boot project for GraphQL.
GraphQL Spring Boot #3 - GraphQL vs REST vs gRPC.
GraphQL tutorial for beginners - Mastering your API security with Spring-boot in seconds : Part 2/3
GraphQL vs REST: Which is Better for APIs?
GraphQL Spring Boot #4 - How GraphQL works in Java?
Spring Boot GraphQL Tutorial #32 – Schema Directive Validation
Комментарии