mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
19 lines
505 B
JavaScript
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 }
|
|
})
|
|
})
|