get-countries-info
Version:
Get countries, states, currency, language, phone code, ISO standards, etc.
1 lines • 2.1 kB
JavaScript
'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _graphql=require('graphql');var _index=require('./index');var _index2=_interopRequireDefault(_index);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var country=new _graphql.GraphQLObjectType({name:'country',description:'Country schema',fields:{name:{type:_graphql.GraphQLString},altSpellings:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},area:{type:_graphql.GraphQLInt},borders:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},callingCodes:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},capital:{type:_graphql.GraphQLString},currencies:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},demonym:{type:_graphql.GraphQLString},flag:{type:_graphql.GraphQLString},ISO:{type:new _graphql.GraphQLObjectType({name:'ISO',fields:function fields(){return{alpha2:{type:_graphql.GraphQLString},alpha3:{type:_graphql.GraphQLString}};}})},languages:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},latlng:{type:new _graphql.GraphQLList(_graphql.GraphQLInt)},nativeName:{type:_graphql.GraphQLString},population:{type:_graphql.GraphQLInt},provinces:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},region:{type:_graphql.GraphQLString},subregion:{type:_graphql.GraphQLString},timezones:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},tld:{type:new _graphql.GraphQLList(_graphql.GraphQLString)},translations:{type:new _graphql.GraphQLObjectType({name:'translations',fields:function fields(){return{de:{type:_graphql.GraphQLString},es:{type:_graphql.GraphQLString},fr:{type:_graphql.GraphQLString},ja:{type:_graphql.GraphQLString},it:{type:_graphql.GraphQLString}};}})},wiki:{type:_graphql.GraphQLString}}});exports.default={type:new _graphql.GraphQLList(country),args:{name:{type:_graphql.GraphQLString},capital:{type:_graphql.GraphQLString},currency:{type:_graphql.GraphQLString},region:{type:_graphql.GraphQLString},language:{type:_graphql.GraphQLString},ISO:{type:_graphql.GraphQLString}},resolve:function resolve(_,args){return(0,_index2.default)(args);}};