-
Notifications
You must be signed in to change notification settings - Fork 9
/
config-multiple-queries.yaml
62 lines (62 loc) · 1.78 KB
/
config-multiple-queries.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
openapi: 3.0.2
info:
title: 'Example site'
version: 0.1.0
x-walder-resources:
root: ./
views: views
pipe-modules: pipeModules
public: public
x-walder-datasources:
- http://fragments.dbpedia.org/2016-04/en
paths:
/artist/{artist}:
get:
# Working example: David Bowie
summary: Returns a list of songs and movies for a given artist.
parameters:
- in: path
name: artist
required: true
schema:
type: string
description: The target artist
x-walder-query:
graphql-query:
songs: >
{
label @single
writer(label_en: $artist) @single
artist @single(scope: all) {
label
}
}
films: >
{
id @single
... on Film {
starring(label_en: $artist) @single
}
}
json-ld-context: >
{
"@context": {
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"label_en": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"writer": "http://dbpedia.org/ontology/writer",
"artist": "http://dbpedia.org/ontology/musicalArtist",
"Film": "http://dbpedia.org/ontology/Film",
"starring": "http://dbpedia.org/ontology/starring"
}
}
responses:
200:
description: list of songs and movies
x-walder-input-text/html: songs_movies.handlebars
x-walder-errors:
404:
description: page not found error
x-walder-input-text/html: error404.html
500:
description: internal server error
x-walder-input-text/html: error500.html