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
-`/graphqleditor` explore your Drupal 7 site's GraphQL schema
36
+
-`/graphql` use your favorite GraphQL client (Apollo http://www.apollodata.com/) to begin query
37
+
-`graphql_api_query_file()` execute .GrahpQL query from file
38
+
17
39
The tools
18
40
---------
19
41
@@ -28,8 +50,8 @@ The tools
28
50
The plans
29
51
---------
30
52
31
-
1. Create module graphql\_api
32
-
2. Create class `Drupal\grapql\_api\Schema` to build GraphQL schema
53
+
1.[x]Create module graphql\_api
54
+
2.[x]Create class `Drupal\grapql\_api\Schema` to build GraphQL schema
33
55
- use `hook_entity_info()`, `hook_entity_property_info()` to build GraphQL schema
34
56
- map Drupal concept to GraphQL concept
35
57
- Entity type -> Interface
@@ -42,7 +64,7 @@ The plans
42
64
- Field API: term_reference -> Interface: term
43
65
- Field API: entityreference -> Interface/Object target entity
44
66
- Field API: relation -> Interface/Object target entity
45
-
3. Create GraphQL endpoint `/graphql`
67
+
3.[x]Create GraphQL endpoint `/graphql`
46
68
- receive POST content with GraphQL query and variables
47
69
- query using Drupal's `EntityFieldQuery`
48
70
- check entity access using `entity_access`
@@ -55,5 +77,5 @@ The plans
55
77
Notes
56
78
-----
57
79
58
-
1. Field will be shortened `field_tags` -> `tags`
59
-
2. If entity type have single bundle, we skip GraphQL interface and just use GraphQL object. Eg: user, file, ...
80
+
1.~~Field will be shortened `field_tags` -> `tags`~~ Shortened field name can be duplicate with base table's column or other property. Keep field name intact.
81
+
2.~~If entity type have single bundle, we skip GraphQL interface and just use GraphQL object. Eg: user, file, ...~~ Entity reference field will resolve to Entity type, not bundle.
0 commit comments