Moving beyond REST: GraphQL and Java & Spring by Pratik Patel @ Spring I/O 2019

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • Spring I/O 2019 - Barcelona, 16-17 May
    We’ve been using REST-based API development for over a decade now. While it provides a contract for both API developers and API consumers, it can be big, rigid and brittle. GraphQL can be used to either augment or replace REST based endpoints to provide faster and more flexible development. In this session, we’ll discuss GraphQL basics and look at how we create a GraphQL server and consume it in a client, using Java, of course! We will also show how easy it is to mix GraphQL into an existing Spring Boot application.
  • Наука та технологія

КОМЕНТАРІ • 17

  • @tomasma4896
    @tomasma4896 5 років тому +6

    Rly nice, thank you for this presentation. Link to your demo would be helpful. Thanks!

  • @domorewithsage
    @domorewithsage 4 роки тому +2

    Would have been useful to see how the Java spring boot application was created, did you use Initializr for example? what dependancies did you start with, etc.

  • @bregtjehamer672
    @bregtjehamer672 4 роки тому

    how did you implement the 'first:1' in the filmConnection ? (11.00 min)

  • @swatipatil7862
    @swatipatil7862 4 роки тому +1

    con you give provide a link to this code on git

  • @suniraju5736
    @suniraju5736 4 роки тому

    Can you please share the link to github for the demo apps?

  • @sandeepsangole
    @sandeepsangole 2 роки тому

    is there any example where filters are passed from the client and GraphQL responds with filtered data?

  • @ilkerkiris3367
    @ilkerkiris3367 4 роки тому +3

    Very nice presentation, but the project is not in your github. Are you able to upload your demo project to your github repo ?

    • @nourkrichene1090
      @nourkrichene1090 3 роки тому

      You can find a similar example in this repository: github.com/NoorKrichen/GrphQL-Spring-Example

  • @nikhilkant123
    @nikhilkant123 4 роки тому

    Really a nice video.Can you please share the github repo for java+ graphql
    code?

    • @qingcaish
      @qingcaish 4 роки тому

      I google another tutorial www.baeldung.com/spring-graphql not from this video

  • @sumanthvarada
    @sumanthvarada 3 роки тому

    Thanks for this wonderful tutorial. is it possible to customize the graphql response format like following ?
    {
    "data":{},
    "info": {},
    "audit": {},
    "error": {}
    }

    • @jasonbikeracer1
      @jasonbikeracer1 3 роки тому +1

      You could do that with spring aspects

    • @sumanthvarada
      @sumanthvarada 3 роки тому

      Jason Buchanan Could you please tell how this can be achieved? Please share if you have any reference

    • @jasonbikeracer1
      @jasonbikeracer1 3 роки тому

      @@sumanthvarada so an aspect is something that happens at some point in any function that fits a given criteria and can manipulate data or the state of your thread. It's usually used for logging but in this case you can feed it your output using an after annotation from any function in your class and have it parsed any way you want.
      howtodoinjava.com/spring-aop/aspectj-after-annotation-example/
      However that violates the point of this whole thing and your going back to almost rewrapping your graph but for rest just to get this data format that doesn't make sense to work. Ie the client should never see any audit or info and an error is a code greater than or equal to 400 with no data but a message

  • @nourkrichene1090
    @nourkrichene1090 3 роки тому +2

    You can find a similar example in this repository: github.com/NoorKrichen/GrphQL-Spring-Example

  • @moisescervantes539
    @moisescervantes539 4 роки тому

    How to add jwt suport in graphql?

    • @myobpro8516
      @myobpro8516 3 роки тому

      Jwt should be in your http header, you can find more by looking in Spring Security documentation.