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
const { ApolloServer } = require("apollo-server"); | |
const { combineNodes, GraphQLNode } = require("idio-graphql"); | |
const gql = require("graphql-tag"); | |
const User = new GraphQLNode({ | |
name: "User", | |
typeDefs: gql` | |
type User { | |
id: ID |
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
const { ApolloServer } = require("apollo-server"); | |
const { combineNodes, GraphQLNode } = require("idio-graphql"); | |
const gql = require("graphql-tag"); | |
const User = new GraphQLNode({ | |
name: "User", | |
typeDefs: gql` | |
type User { | |
id: ID |
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
const { ApolloServer } = require("apollo-server"); | |
const { combineNodes, GraphQLNode, IdioEnum } = require("idio-graphql"); | |
const gql = require("graphql-tag"); | |
const StatusEnum = new IdioEnum({ | |
name: "Status", | |
typeDefs: gql` | |
enum Status { | |
ONLINE |
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
const { combineNodes, GraphQLNode, IdioDirective } = require("idio-graphql"); | |
const { ApolloServer } = require("apollo-server"); | |
const { HasScopeDirective } = require("graphql-auth-directives"); | |
const gql = require("graphql-tag"); | |
const hasScopeDirective = new IdioDirective({ | |
name: "hasScope", | |
typeDefs: gql` | |
directive @hasScope(scopes: [String]!) on FIELD_DEFINITION | |
`, |
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
const { combineNodes, GraphQLNode, IdioScalar } = require("idio-graphql"); | |
const { ApolloServer } = require("apollo-server"); | |
const { GraphQLJSON } = require("graphql-type-json"); | |
const gql = require("graphql-tag"); | |
const JSONScalar = new IdioScalar({ | |
name: "JSON", | |
resolver: GraphQLJSON | |
}); |
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
const { combineNodes, GraphQLNode } = require("idio-graphql"); | |
const { ApolloServer } = require("apollo-server"); | |
const gql = require("graphql-tag"); | |
const User = new GraphQLNode({ | |
name: "User", | |
typeDefs: gql` | |
type User { | |
id: ID | |
name: String |
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
const { combineNodes, GraphQLNode } = require("idio-graphql"); | |
const { ApolloServer } = require("apollo-server"); | |
const gql = require("graphql-tag"); | |
const User = new GraphQLNode({ | |
name: "User", | |
typeDefs: gql` | |
type User { | |
name: String | |
} |
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
const { combineNodes, GraphQLNode } = require("idio-graphql"); | |
const { ApolloServer } = require("apollo-server"); | |
const gql = require("graphql-tag"); | |
const User = new GraphQLNode({ | |
name: "User", | |
typeDefs: gql` | |
type User { | |
name: String | |
} |
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
type Person { | |
name: String! | |
born: Int! | |
actedInMovies: [Movie!]! @relationship(type: "ACTED_IN", direction: OUT) | |
directedMovies: [Movie!]! @relationship(type: "DIRECTED", direction: OUT) | |
} | |
type Genre { | |
name: String! | |
movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN) |
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 GetMovie { | |
movies(where: { title: "Forrest Gump" }) { | |
title | |
released | |
actors { | |
name | |
born | |
} | |
director { | |
name |
OlderNewer