const {
    GraphQLSchema,
    GraphQLObjectType,
    GraphQLList
  } = require('graphql');
  
const AdType = require('./types/adType')
const AdQuery = require('./queries/adQuery')

const RootQuery = new GraphQLObjectType({
  name: 'rootQuery',
  description: 'This is the root query which holds all possible READ entrypoints for the GraphQL API',
  fields: () => ({
    ad: AdQuery
  }),
});

const schema = new GraphQLSchema({
  query: RootQuery
});


module.exports =  schema 