Last active
September 9, 2021 12:09
-
-
Save percybolmer/fd7d596f156e954fd92a75d203f0280e to your computer and use it in GitHub Desktop.
graphql
This file contains hidden or 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 schemas | |
import ( | |
"github.com/graphql-go/graphql" | |
) | |
// We can initialize Objects like this unless they need a special resolver | |
var jobType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Job", | |
Fields: graphql.Fields{ | |
"id": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
"employeeID": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
"company": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
"title": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
"start": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
"end": &graphql.Field{ | |
Type: graphql.String, | |
}, | |
}, | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment