No video

Spring Tips: Spring GraphQL

  Рет қаралды 32,282

SpringDeveloper

SpringDeveloper

Күн бұрын

Hi, Spring fans! In this installment we look at the new Spring GraphQL project

Пікірлер: 32
@edon1257
@edon1257 2 жыл бұрын
So far pretty straightforward and always simple! Let's hope Spring Security, Testing, and other components will follow the same path!
@tracy_gao
@tracy_gao 2 жыл бұрын
Josh Long never failed me
@s1mpl3_
@s1mpl3_ 2 жыл бұрын
Thumbs up for the JS jokes. Josh never disappoints.
@rajivkumar-ub6uj
@rajivkumar-ub6uj 2 жыл бұрын
Wow! Good to see things this way
@jiten8450
@jiten8450 Жыл бұрын
This guy explains without drag, Very Cool!
@funksoul123456
@funksoul123456 2 жыл бұрын
Great video! Keep up the hard work!
@simdavis8602
@simdavis8602 2 жыл бұрын
As a total newcomer to Java (been a typescript / javascript backend dev for years, I started learning Java this weekend for a new job) this is great and I have a functioning graqhql server thanks to this video. I'm really surprised that tool this easy for graphql is only 2 weeks old in 2021. It'd be great to see this series develop as I'm sure there are plenty of devs like me who are used to Apollo and have a solid understanding of graphql but have to learn the new syntax of spring-graphql. I'm sure you've implemented gql interfaces and I haven't got to that part of the docs yet! For anyone struggling to get to the working server stage I suggest checking the dependencies again, I missed / got confused when we went back to add the in memory SQL.
@ivanatroshonok2660
@ivanatroshonok2660 2 жыл бұрын
Thanks a lot for the demo. The project looks great. Let's see how it grows
@myatnoesmusic
@myatnoesmusic 2 жыл бұрын
Thank you for great demo. Hoping for spring security and testing
@agustinernestocardeilhacba1765
@agustinernestocardeilhacba1765 2 жыл бұрын
Man !!!... So useful !!! :)thank you very much !!!
@philipschikora20
@philipschikora20 2 жыл бұрын
Thank you Josh!
@Rahul-pr1zr
@Rahul-pr1zr 2 жыл бұрын
Great presentation! I had a question - how are errors handled in SpringBoot graphql? In REST for instance, I could return a 404 if I don't find a record corresponding to a query but in graphql at least from what I see in the graphiql UI I get an INTERNAL_ERROR as the error classification and don't see an error code. Is there a way to return HTTP error codes?
@1975mag
@1975mag 2 жыл бұрын
DGS is schema centric, schema first too! I use it that way.
@miletacekovic
@miletacekovic 2 жыл бұрын
Btw these 'fetchers' of related data can quickly lead to N+1 problems. Calling N time in parallel using reactive will just reduce the latency, but the payload to the data source containing related data will be huuuuuugeeeeee... Sounds too familiar issue...
@coffeesoftware
@coffeesoftware 2 жыл бұрын
100% - the N+1 problem is a very real problem. Ideally, you wouldn't have your service architecture setup to require that, but it sometimes happens, and at least reactive programming and Spring GraphQL make it as concise and easy to implement as possible.
@RenatoCostaDev
@RenatoCostaDev 2 жыл бұрын
40:36 - Yeah, I spat out my drink. Well done! haha
@ChrisB_Crisps
@ChrisB_Crisps 2 жыл бұрын
@SpringDeveloper (and also JoshLong) Would be possible to have a GraphQL code-first approach video? Instead of schema first? I see that you are writing a graphql schema with types like Customer, Order, and then you have to duplicate thatin java code for the records for Customer Order, CustomerEvent, Duplication of CustomerEvent type enum in both sides. What the spring boot application uses for the reactivecCrudRepositories, Subscribers, Flux, Mono is the Java code, not the schema. One can write something in the schema but what counts is what is on the classes, those classes are used in the medium and lower levels of abstraction. One can have a schema but that might differ from the classes unintentionally, there could be typos the could be other mistakes. The schema is only used for the datafetchers for the annotations, only for communication not for what the business logic does. There is no guarantee that things will match. While for some cases a Schema-first approach is good for innersource or internal services a code-first approach can fit better. You experienced the issue of doing Schema first on the customerId naming issue towards the end of the video, even a small codebase like this example from an experieced developer had such issue with mismatch 2 times. With a code-first approach you would only have had to debug the java code and the javascript, no need to make JavaSchemajavascript debugging :) Josh how about having, another spring tips video or a Bootiful podcast with the awesome Dariusz Kuc? He has a talk about "Bootiful GraphQL with Kotlin" kzfaq.info?search_query=graphql+dariusz+kuc Thanks
@kidsartclub1112
@kidsartclub1112 2 жыл бұрын
Can the order service be in its own spring boot application? How would spring stitches the customer and order service schema together, Is there a gateway involved that knows where the customer service and order service is located ?
@sujan_kumar_mitra
@sujan_kumar_mitra 2 жыл бұрын
Nice. Please bring integration with gRPC as well.
@InternationalMutt
@InternationalMutt 2 жыл бұрын
This is great, but any guides on integration testing the graphql endpoints with junit?
@miletacekovic
@miletacekovic 2 жыл бұрын
for (var orderId = 1; orderId
@coffeesoftware
@coffeesoftware 2 жыл бұрын
you're absolutely right! thanks for lookin' out for me :-)
@michaelduffy5309
@michaelduffy5309 2 жыл бұрын
I followed along with the (very good) video and made all the code work locally (except for the web socket example). But I'm not able to make it work for a project of my own devising. I've created a non-reactive repository to interact with Mongo DB, created model classes to map the JSON documents into, added a web MVC controller to serve up the data. I'm able to see data coming back if I use a Swagger UI to communicate with a REST controller. But when I connect the /graphiql UI to my web MVC controller I get an "Error Fetching Schema" message in the Docs section. Setting logging to DEBUG didn't turn up any new information. I tried setting breakpoints but only fell into a hole. What's the best way to get information out to debug schema issues? All the other tutorials are not using the annotations that Josh does.
@louisdaisomont490
@louisdaisomont490 Жыл бұрын
Hello, I'm new to spring boot and graphql so my question might be dump but I didn't see any answer on internet so i'm asking it here. What's the difference between the graphql resolvers and the sring boot Controller ? Most of the tutorials I see on google and youtube are using these specific ways (some are also using services but it seems less popular) of mapping a query to an execution that will retrieve data from a repository. I can't find are the differences, do they have the same purpose or maybe I am misunderdanting something ? What is the best way to make that schema mapping between query and execution ? I would be glad to have your thoughts about this, if my question isn't clear, tell me how i can explain it better. Thanks for your help
@shahablaghaee195
@shahablaghaee195 2 жыл бұрын
With Code First approach, you wrote fewer code, and have less maintenance.
@rajkumar-vd6bm
@rajkumar-vd6bm 2 жыл бұрын
Good tutorial, I have requirement like I have to write some data which comes in request (example like customer details)and return txt or pdf file how to do that in my local machine Please help me on this
@adityaparikh9544
@adityaparikh9544 2 жыл бұрын
How do we propagate the ReactorContext from the @QueryMapping of the Parent data to the @SchemaMapping of the child data fetcher?
@tomlausmann7365
@tomlausmann7365 2 жыл бұрын
How do i connect the customer events handler method to the points where the events acutally spawn? Do i implement something like a hot-stream service, that creates the "never ending" Flux and connect that to the handler method, so that other services can put things into that flux? Or what is the recommended approach?
@vitiyou
@vitiyou 2 жыл бұрын
Hi..can example for entire crud ?
@PainterMathavan
@PainterMathavan 2 жыл бұрын
How will it work with RestController?
@ogyct
@ogyct 2 жыл бұрын
I think 99% of real world projects will just have data stored in sql DB as relations. Last time I checked, r2dbc was unable to handle that. Did anything change?
@ilyailyukou7895
@ilyailyukou7895 2 жыл бұрын
where i can find the source code?)
Spring Tips: Spring Native 0.11!
59:35
SpringDeveloper
Рет қаралды 24 М.
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 23 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 28 МЛН
Kids' Guide to Fire Safety: Essential Lessons #shorts
00:34
Fabiosa Animated
Рет қаралды 17 МЛН
Incredible Dog Rescues Kittens from Bus - Inspiring Story #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 28 МЛН
Spring GraphQL
56:29
SpringDeveloper
Рет қаралды 22 М.
Spring Tips: @Controllers: GraphQL
15:44
SpringDeveloper
Рет қаралды 12 М.
What Is Spring?
52:55
SpringDeveloper
Рет қаралды 24 М.
Spring Tips: Spring for GraphQL: Queries
22:25
SpringDeveloper
Рет қаралды 8 М.
Spring Tips: Bootiful Edge Services
30:05
SpringDeveloper
Рет қаралды 13 М.
Spring Tips: Spring for GraphQL: Batching Requests
15:44
SpringDeveloper
Рет қаралды 7 М.
Spring Tips: Spring Statemachine
59:46
SpringDeveloper
Рет қаралды 53 М.
Spring Tips: Multitenant JDBC
38:38
SpringDeveloper
Рет қаралды 32 М.
Spring Tips: Spring for GraphQL: Data
24:42
SpringDeveloper
Рет қаралды 7 М.
Spring Tips: Kubernetes Native Java
29:23
SpringDeveloper
Рет қаралды 34 М.
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 28 МЛН