You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An experimental implementation of [GraphQL](https://graphql.org) for Umbraco using [GraphQL for .NET](https://github.com/graphql-dotnet/graphql-dotnet).
@@ -12,9 +12,7 @@ An Owin middleware exposes Umbraco Published Content as a GraphQL endpoint.
12
12
13
13
GraphQL types are dynamically generated for all Umbraco document types (content and media), with all the properties as fields. They all implement an interface `PublishedContent` which implements the generic Umbraco properties as fields.
14
14
15
-
If a document type is alloweded at root, a field on the query is generated with the same name as the document type alias.
16
15
17
-
There are also two generic fields `content(id: ID!)` and `contentAtRoot` which can be used to query by `id` or getting all root content.
18
16
19
17
## Getting started
20
18
Clone the repository and run the Website (F5 in Visual Studio), install Umbraco with the starter kit and start exploring the API using GraphiQL by opening `/umbraco/graphiql`.
@@ -29,87 +27,123 @@ There's also a [download](https://drive.google.com/file/d/1L67kZV7u6tXy45zknLih4
29
27
| /umbraco/graphql/schema | The generated schema |
30
28
31
29
### Querying
32
-
Query examples based on the download above
33
-
30
+
Query examples based on The Starter Kit
34
31
```graphql
35
32
{
36
-
people {
37
-
pageTitle
38
-
children {
39
-
items {
40
-
...onPerson {
41
-
name
42
-
department
43
-
photo {
44
-
url
33
+
content {
34
+
byType {
35
+
People(id: "1116") {
36
+
pageTitle
37
+
_contentData {
38
+
children {
39
+
items {
40
+
...onPerson {
41
+
_contentData {
42
+
name
43
+
}
44
+
department
45
+
photo {
46
+
_contentData {
47
+
url
48
+
}
49
+
}
50
+
}
51
+
}
45
52
}
46
53
}
47
54
}
48
55
}
49
56
}
50
57
}
58
+
51
59
```
52
60
53
61
We can also do some simple filtering and sorting, ([Inspired by the Grahpcool filtering](https://www.graph.cool/docs/reference/graphql-api/query-api-nia9nushae#query-arguments)) like geting all children of people that starts with the letter `J`
0 commit comments