This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Steps to run this script | |
# $ sudo -s | |
# $ touch script.sh | |
## copy paste this file to script.sh | |
# $ chmod +x script.sh | |
# $ ./script.sh 2>&1 | tee scriptoutput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"link": { | |
"rel": "self", | |
"href": "/lists" | |
}, | |
"lists": [ | |
{ | |
"link": { | |
"rel": "self", | |
"href": "/lists/41" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"list": { | |
"link": { | |
"rel": "self", | |
"href": "/lists/42" | |
}, | |
"id": 42, | |
"position": 1, | |
"name": "Doing", | |
"listItems": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
lists(positions: 1) { | |
items(positions: [0]) { | |
name | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"item": { | |
"link": { | |
"rel": "self", | |
"href": "/items/24" | |
}, | |
"id": 24, | |
"position": 0, | |
"listId": 42, | |
"name": "Write" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"lists": [ | |
{ | |
"items": [ | |
{ | |
"name": "Write" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schema { | |
query: Query | |
mutation: Mutation | |
} | |
type List { | |
id:ID! | |
name:String | |
position:Int | |
# if 'positions' is included items in only those positions are considered, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GraphQLProvider { | |
// Initializes the GraphQL configuration and Handles Requests from the clients | |
private static final String GRAPHQL_SCHEMA_FILE = "/schema.graphqls"; | |
private GraphQL graphQL; | |
@Autowired | |
private GraphQLDataFetcher graphQLDataFetcher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GraphQLDataFetcher { | |
// Communicates with Application's Service Layer and Fetches data required by GraphQL | |
@Autowired | |
private ListEntityService listEntityService; | |
@Autowired | |
private ItemService itemService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NgModule} from '@angular/core'; | |
import { HttpClientModule } from '@angular/common/http'; | |
// Apollo | |
import { ApolloModule, Apollo } from 'apollo-angular'; | |
import { HttpLinkModule, HttpLink } from 'apollo-angular-link-http'; | |
import {InMemoryCache} from 'apollo-cache-inmemory'; | |
const uri = 'http://localhost:8080/graphql'; // Back-End GraphQL EndPoint |
OlderNewer