"use strict";var d=Object.create;var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var y=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},c=(r,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of f(e))!m.call(r,i)&&i!==o&&n(r,i,{get:()=>e[i],enumerable:!(l=p(e,i))||l.enumerable});return r};var S=(r,e,o)=>(o=r!=null?d(b(r)):{},c(e||!r||!r.__esModule?n(o,"default",{value:r,enumerable:!0}):o,r)),g=r=>c(n({},"__esModule",{value:!0}),r);var v={};y(v,{buildSchema:()=>h});module.exports=g(v);var a=S(require("@pothos/core"),1),t=require("@bicou/countries-server-data"),u=new a.default({}),s=u.objectRef("Country");function h(r){return u.objectType(s,{description:"A country record",fields:e=>({code:e.exposeID("ISO",{nullable:!1,description:"ISO code"}),name:e.exposeString("Country",{nullable:!1,description:"Name of country"}),alpha3:e.exposeString("ISO3",{nullable:!1,description:"Alpha\u20113 code"}),numeric:e.exposeString("ISO-Numeric",{nullable:!1,description:"Numeric"}),tld:e.exposeString("tld",{nullable:!1,description:"Top level domain"}),neighbours:e.field({type:[s],nullable:!1,description:"Neighbours countries",resolve:o=>t.countries.filter(l=>o.neighbours.includes(l.ISO))})})}),u.queryType({description:"Queries",fields:e=>({version:e.string({nullable:!1,description:"Package version",resolve:()=>r}),countries:e.field({type:[s],nullable:!1,description:"All countries",resolve:()=>t.countries}),country:e.field({type:s,description:"Country by code",nullable:!0,args:{code:e.arg.id({required:!0})},resolve:(o,{code:l})=>t.countries.find(i=>i.ISO==l)})})}),u.toSchema()}0&&(module.exports={buildSchema});