Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/leangen/graphql-spqr-samples
- Owner: leangen
- License: apache-2.0
- Created: 2016-09-23T14:36:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-10T23:59:54.000Z (over 3 years ago)
- Last Synced: 2024-10-31T18:38:19.079Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 742 KB
- Stars: 105
- Watchers: 14
- Forks: 59
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-graphql - graphql-spqr-samples - An example GraphQL server written with Spring MVC and GraphQL-SPQR (Examples / Java Examples)
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
}
}
}
}
}
}
}
}
```