const {
    GraphQLInt,
    GraphQLString,
    GraphQLList,
    GraphQLObjectType,
  } = require('graphql');
  
//   const { AdType } = require('../types/adType');
const  db  = require('../../models');

const Ad = db.ads;
const AdType = require('./../types/adType')  

const AdQuery = {

    type : GraphQLList(AdType),
    resolve: async () => await Ad.find({})
  
};          
  
  module.exports =  AdQuery ;