graphbrainz/src/types/instrument.js

28 lines
564 B
JavaScript
Raw Normal View History

2016-08-20 05:59:32 +00:00
import { GraphQLObjectType, GraphQLString } from 'graphql/type'
2016-08-31 06:33:29 +00:00
import Node from './node'
2016-08-20 05:59:32 +00:00
import Entity from './entity'
import {
fieldWithID,
id,
2016-08-31 06:33:29 +00:00
mbid,
2016-08-20 05:59:32 +00:00
name,
disambiguation
} from './helpers'
const Instrument = new GraphQLObjectType({
name: 'Instrument',
description:
'Instruments are devices created or adapted to make musical sounds.',
2016-08-31 06:33:29 +00:00
interfaces: () => [Node, Entity],
2016-08-20 05:59:32 +00:00
fields: () => ({
id,
2016-08-31 06:33:29 +00:00
mbid,
2016-08-20 05:59:32 +00:00
name,
disambiguation,
description: { type: GraphQLString },
...fieldWithID('type')
})
})
export default Instrument