Giter Site home page Giter Site logo

graphql-example's Introduction

graphql-example

  • GraphQL Schema

http://localhost:8080/graphql/schema.json

  • GraphiQL

http://localhost:8080/graphiql

  • 操作演示

GraphiQL操作演示

Postman操作演示

GET方式

http://localhost:8080/graphql?query={findAllBooks{title pageCount isbn author{firstName lastName}}}

对原字符串{findAllBooks{title pageCount isbn author{firstName lastName}}}进行UrlEncode编码

http://localhost:8080/graphql?query=%7BfindAllBooks%7Btitle%20pageCount%20isbn%20author%7BfirstName%20lastName%7D%7D%7D

POST方式直接提交json

GraphiQL中查询语法为:

{ findAllBooks { title pageCount isbn author { firstName lastName } } }

Postman中查询语法为:

{ "query":"{findAllBooks {title pageCount isbn author {firstName lastName}}}" }

提交的url仍为 http://localhost:8080/graphql

操作演示

参考文档

https://www.pluralsight.com/guides/java-and-j2ee/building-a-graphql-server-with-spring-boot

https://blog.pusher.com/writing-graphql-service-using-kotlin-spring-boot

graphql-example's People

Contributors

v5tech avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.