...
 
Commits (2)
......@@ -4,7 +4,7 @@ const formParser = require('body-parser').urlencoded({ extended: false });
const PortierClient = require('portier');
const graphql = require('graphql').graphql
const graphQLHTTP = require('express-graphql')
const Schema = require('./src/graphql/types/schema')
const Schema = require('./src/graphql/schema')
const next = require('next')
const redirectBaseUrl = process.env.PORTIER_REDIRECT_BASE_URL || "http://localhost:3000";
......
......@@ -3,7 +3,7 @@ const {
GraphQLList
} = require('graphql')
const MovieType = require('./movieType')
const MovieType = require('./types/movieType')
const MOVIES = [{
id: '1381220',
......
const {
GraphQLObjectType,
GraphQLString,
GraphQLID,
GraphQLBoolean,
GraphQLList
} = require('graphql')
const Movie = require('./movieType');
module.exports = new GraphQLObjectType({
name: 'movieCollection',
fields: () => {
return {
id: {
type: GraphQLID
},
name: {
type: GraphQLString
},
isLoading: {
type: GraphQLBoolean
},
sort: {
type: GraphQLString
},
movies: {
type: new GraphQLList(Movie)
}
}
}
});