const {
  linkTypeMap,
  createClient: createClientOriginal,
  generateGraphqlOperation,
  assertSameVersion,
} = require('@genql/runtime')
var typeMap = linkTypeMap(require('./types.cjs'))

var version = '2.10.0'
assertSameVersion(version)

module.exports.version = version

module.exports.createClient = function(options) {
  options = options || {}
  var optionsCopy = {
    url:
      'https://greenfield.cognitedata.com/api/v1/projects/platypus/schema/api/moviedm/1/graphql',
    queryRoot: typeMap.Query,
    mutationRoot: typeMap.Mutation,
    subscriptionRoot: typeMap.Subscription,
  }
  for (var name in options) {
    optionsCopy[name] = options[name]
  }
  return createClientOriginal(optionsCopy)
}

module.exports.enumSortDirection = {
  ASC: 'ASC',
  DESC: 'DESC',
}

module.exports.enumSearchActorFields = {
  name: 'name',
  age: 'age',
  externalId: 'externalId',
  spaceExternalId: 'spaceExternalId',
}

module.exports.enumSearchMachinePump2Fields = {
  name: 'name',
  description: 'description',
  state: 'state',
  weight: 'weight',
  isActive: 'isActive',
  production_ts: 'production_ts',
  pressure_ts: 'pressure_ts',
  location_3dmr: 'location_3dmr',
  location_3dn: 'location_3dn',
  pnid_file: 'pnid_file',
  externalId: 'externalId',
  spaceExternalId: 'spaceExternalId',
}

module.exports.enumSearchMachinePumpFields = {
  name: 'name',
  description: 'description',
  state: 'state',
  weight: 'weight',
  isActive: 'isActive',
  production_ts: 'production_ts',
  pressure_ts: 'pressure_ts',
  location_3dmr: 'location_3dmr',
  location_3dn: 'location_3dn',
  pnid_file: 'pnid_file',
  externalId: 'externalId',
  spaceExternalId: 'spaceExternalId',
}

module.exports.enumSearchMovieFields = {
  name: 'name',
  description: 'description',
  watchedIt: 'watchedIt',
  imdbRating: 'imdbRating',
  releasedYear: 'releasedYear',
  gross: 'gross',
  runTime: 'runTime',
  externalId: 'externalId',
  spaceExternalId: 'spaceExternalId',
}

module.exports.generateQueryOp = function(fields) {
  return generateGraphqlOperation('query', typeMap.Query, fields)
}
module.exports.generateMutationOp = function(fields) {
  return generateGraphqlOperation('mutation', typeMap.Mutation, fields)
}
module.exports.generateSubscriptionOp = function(fields) {
  return generateGraphqlOperation('subscription', typeMap.Subscription, fields)
}
module.exports.everything = {
  __scalar: true,
}

var schemaExports = require('./guards.cjs')
for (var k in schemaExports) {
  module.exports[k] = schemaExports[k]
}
