Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leangen/graphql-spqr-samples

Minimal demo app for graphql-spqr
https://github.com/leangen/graphql-spqr-samples

Last synced: about 1 month ago
JSON representation

Minimal demo app for graphql-spqr

Awesome Lists containing this project

README

        

# GraphQL-SPQR Spring Boot Samples

[![Build Status](https://travis-ci.org/leangen/graphql-spqr-samples.svg?branch=master)](https://travis-ci.org/leangen/graphql-spqr-samples)
[![Join the chat at https://gitter.im/leangen/graphql-spqr](https://badges.gitter.im/leangen/graphql-spqr.svg)](https://gitter.im/leangen/graphql-spqr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Simplistic Spring Boot application for demoing GraphQL SPQR lib's capabilities.
This is mostly used by us for doing live demo's in our talks, not as documentation.

Package with Maven, run the jar, play around.

Out of the box, the application runs on port 8000

GraphQL Playground (graphical environment) is mapped to `/gui` by default (e.g. http://localhost:8000/gui)

API is exposed on `/graphql`

Example queries can be found in javadoc for query methods

For an elaborate introspection query you might want to use:
```graphql
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
```