GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — graphql-java-examples/http-example at master · thinkingpi9/graphql-java-examples

Expand file tree

/

http-example

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

http-example

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
gradle/wrapper
gradle/wrapper
 
 
src
src
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
readme.md
readme.md
 
 
settings.gradle
settings.gradle
 
 

readme.md

graphql-java-http-example

An example of using graphql-java in a HTTP application.

It demonstrates the use of Schema Definition Language (SDL) to define a schema in a textual way.

It also shows how to use data loader to ensure that most efficient way to load inside a graphql query

Finally it shows how to combine graphql-java Instrumentation to create performance tracing and data loader effectiveness statistics.

To build the code type

./gradlew build

To run the code type

./gradlew bootRun

Point your browser at

http://localhost:8080/    

Some example graphql queries might be

 {
   hero {
     name
     friends {
       name
       friends {
         id
         name
       }
       
     }
   }
 }

or maybe

{
  luke: human(id: "1000") {
    ...HumanFragment
  }
  leia: human(id: "1003") {
    ...HumanFragment
  }
}

fragment HumanFragment on Human {
  name
  homePlanet
  friends {
    name
    __typename
  }
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.