2016-08-20 05:59:32 +00:00
|
|
|
import { GraphQLSchema, GraphQLObjectType } from 'graphql'
|
2016-11-27 03:19:18 +00:00
|
|
|
import { lookupField, browseField, searchField } from './queries'
|
2016-08-31 06:33:29 +00:00
|
|
|
import { nodeField } from './types/node'
|
2016-08-08 07:54:06 +00:00
|
|
|
|
|
|
|
|
export default new GraphQLSchema({
|
|
|
|
|
query: new GraphQLObjectType({
|
2016-11-26 01:38:32 +00:00
|
|
|
name: 'Query',
|
|
|
|
|
description: `The query root, from which multiple types of MusicBrainz
|
|
|
|
|
requests can be made.`,
|
2016-08-08 07:54:06 +00:00
|
|
|
fields: () => ({
|
2016-08-31 06:33:29 +00:00
|
|
|
node: nodeField,
|
2016-11-27 03:19:18 +00:00
|
|
|
lookup: lookupField,
|
|
|
|
|
browse: browseField,
|
|
|
|
|
search: searchField
|
2016-08-08 07:54:06 +00:00
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|