graphbrainz/src/types/alias.js
2016-08-19 22:59:32 -07:00

19 lines
505 B
JavaScript

import {
GraphQLObjectType,
GraphQLString,
GraphQLBoolean
} from 'graphql/type'
import { MBID } from './scalars'
import { getHyphenated } from './helpers'
export default new GraphQLObjectType({
name: 'Alias',
fields: () => ({
name: { type: GraphQLString },
sortName: { type: GraphQLString, resolve: getHyphenated },
locale: { type: GraphQLString },
primary: { type: GraphQLBoolean },
type: { type: GraphQLString },
typeID: { type: MBID, resolve: getHyphenated }
})
})