2016-08-20 05:59:32 +00:00
|
|
|
import { GraphQLSchema, GraphQLObjectType } from 'graphql'
|
|
|
|
|
import { LookupQuery, BrowseQuery, SearchQuery } 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-26 01:38:32 +00:00
|
|
|
lookup: {
|
|
|
|
|
type: LookupQuery,
|
|
|
|
|
description: 'Perform a lookup of a MusicBrainz entity by its MBID.',
|
|
|
|
|
resolve: () => ({})
|
|
|
|
|
},
|
|
|
|
|
browse: {
|
|
|
|
|
type: BrowseQuery,
|
|
|
|
|
description: `Browse all MusicBrainz entities directly linked to another
|
|
|
|
|
entity.`,
|
|
|
|
|
resolve: () => ({})
|
|
|
|
|
},
|
|
|
|
|
search: {
|
|
|
|
|
type: SearchQuery,
|
|
|
|
|
description: `Search for MusicBrainz entities using Lucene query
|
|
|
|
|
syntax.`,
|
|
|
|
|
resolve: () => ({})
|
|
|
|
|
}
|
2016-08-08 07:54:06 +00:00
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|