2016-08-20 05:59:32 +00:00
|
|
|
import { GraphQLObjectType } from 'graphql'
|
|
|
|
|
import {
|
2016-09-01 04:31:48 +00:00
|
|
|
AreaConnection,
|
|
|
|
|
ArtistConnection,
|
|
|
|
|
LabelConnection,
|
|
|
|
|
PlaceConnection,
|
|
|
|
|
RecordingConnection,
|
|
|
|
|
ReleaseConnection,
|
|
|
|
|
ReleaseGroupConnection,
|
|
|
|
|
WorkConnection
|
2016-08-20 05:59:32 +00:00
|
|
|
} from '../types'
|
|
|
|
|
import { searchQuery } from '../types/helpers'
|
|
|
|
|
|
|
|
|
|
export default new GraphQLObjectType({
|
|
|
|
|
name: 'SearchQuery',
|
|
|
|
|
description:
|
|
|
|
|
'Search queries provide a way to search for MusicBrainz entities using ' +
|
|
|
|
|
'Lucene query syntax.',
|
|
|
|
|
fields: {
|
2016-09-01 04:31:48 +00:00
|
|
|
areas: searchQuery(AreaConnection),
|
|
|
|
|
artists: searchQuery(ArtistConnection),
|
|
|
|
|
labels: searchQuery(LabelConnection),
|
|
|
|
|
places: searchQuery(PlaceConnection),
|
|
|
|
|
recordings: searchQuery(RecordingConnection),
|
|
|
|
|
releases: searchQuery(ReleaseConnection),
|
|
|
|
|
releaseGroups: searchQuery(ReleaseGroupConnection),
|
|
|
|
|
works: searchQuery(WorkConnection)
|
2016-08-20 05:59:32 +00:00
|
|
|
}
|
|
|
|
|
})
|