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 { | |
GraphQLSchema, | |
GraphQLObjectType, | |
GraphQLString, | |
GraphQLNonNull, | |
GraphQLList, | |
GraphQLBoolean, | |
GraphQLInt, | |
GraphQLFloat, | |
GraphQLEnumType, |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$viewportIncrement: 1px; | |
$small: 480px; | |
$postSmall: $small + $viewportIncrement; | |
.test { | |
width: $viewportIncrement; |
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
package graphql | |
type Resources struct { | |
} | |
type Resource struct { | |
ID string `json:"id"` | |
Total float64 `json:"total"` | |
Used float64 `json:"used"` | |
When time.Time `json:"when"` |
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
package main | |
import ( | |
"net/http" | |
"log" | |
"github.com/graphql-go/handler" | |
"github.com/graphql-go/relay/examples/starwars" | |
) |
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
package data | |
// Data model structs | |
type Post struct { | |
Id string `json:"id"` | |
Text string `json:"text"` | |
} | |
// Mock data | |
var latestPost = &Post{ |
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
package main | |
import ( | |
"github.com/graphql-go/graphql" | |
) | |
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Query", | |
Fields: graphql.Fields{ | |
"latestPost": &graphql.Field{ |
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
package main | |
import ( | |
"net/http" | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/graphql-go-handler" | |
) | |
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
// ... |
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
package data | |
import ( | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/relay" | |
) | |
var postType *graphql.Object | |
var queryType *graphql.Object | |
var Schema graphql.Schema |
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
package main | |
import ( | |
"github.com/graphql-go/graphql" | |
"github.com/kr/pretty" | |
) | |
type Todo struct { | |
ID string `json:"id"` | |
Text string `json:"text"` |
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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/handler" | |
"github.com/graphql-go/relay/examples/starwars" | |
) |