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
Copy file name to clipboardExpand all lines: core/graphql.md
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ You can of course disable or configure these operations.
161
161
162
162
For instance, in the following example, only the query of an item and the create mutation are enabled:
163
163
164
-
[codeSelector]
164
+
<code-selector>
165
165
166
166
```php
167
167
<?php
@@ -205,7 +205,7 @@ resources:
205
205
</resources>
206
206
```
207
207
208
-
[/codeSelector]
208
+
</code-selector>
209
209
210
210
## Queries
211
211
@@ -452,7 +452,7 @@ resources:
452
452
</resources>
453
453
```
454
454
455
-
[/codeSelector]
455
+
</code-selector>
456
456
457
457
Note that you need to explicitly add the auto-generated queries and mutations if they are needed when configuring custom queries, like it's done for the [operations](#operations).
458
458
@@ -699,7 +699,7 @@ resources:
699
699
</resources>
700
700
```
701
701
702
-
[/codeSelector]
702
+
</code-selector>
703
703
704
704
Note that you need to explicitly add the auto-generated queries and mutations if they are needed when configuring custom mutations, like it's done for the [operations](#operations).
705
705
@@ -802,7 +802,7 @@ resources:
802
802
</resources>
803
803
```
804
804
805
-
[/codeSelector]
805
+
</code-selector>
806
806
807
807
### Subscribe
808
808
@@ -980,7 +980,7 @@ resources:
980
980
</resources>
981
981
```
982
982
983
-
[/codeSelector]
983
+
</code-selector>
984
984
985
985
Or at the resource attributes level (will be also applied in REST and for all operations):
986
986
@@ -1033,7 +1033,7 @@ resources:
1033
1033
</resources>
1034
1034
```
1035
1035
1036
-
[/codeSelector]
1036
+
</code-selector>
1037
1037
1038
1038
## Events
1039
1039
@@ -1120,7 +1120,7 @@ resources:
1120
1120
</resources>
1121
1121
```
1122
1122
1123
-
[/codeSelector]
1123
+
</code-selector>
1124
1124
1125
1125
### Syntax for Filters with a List of Key / Value Arguments
1126
1126
@@ -1370,7 +1370,7 @@ resources:
1370
1370
</resources>
1371
1371
```
1372
1372
1373
-
[/codeSelector]
1373
+
</code-selector>
1374
1374
1375
1375
Or if you want to do it at the resource level:
1376
1376
@@ -1405,7 +1405,7 @@ resources:
1405
1405
</resources>
1406
1406
```
1407
1407
1408
-
[/codeSelector]
1408
+
</code-selector>
1409
1409
1410
1410
Once enabled, a `page` filter will be available in the collection query (its name [can be changed in the configuration](pagination.md)) and an `itemsPerPage` filter will be available too if [client-side-pagination](pagination.md#client-side) is enabled.
1411
1411
@@ -1486,7 +1486,7 @@ resources:
1486
1486
</resources>
1487
1487
```
1488
1488
1489
-
[/codeSelector]
1489
+
</code-selector>
1490
1490
1491
1491
#### For a Specific Resource Collection Operation
1492
1492
@@ -1530,7 +1530,7 @@ resources:
1530
1530
</resources>
1531
1531
```
1532
1532
1533
-
[/codeSelector]
1533
+
</code-selector>
1534
1534
1535
1535
### Partial Pagination
1536
1536
@@ -1627,7 +1627,7 @@ resources:
1627
1627
</resources>
1628
1628
```
1629
1629
1630
-
[/codeSelector]
1630
+
</code-selector>
1631
1631
1632
1632
### Securing Properties (Including Associations)
1633
1633
@@ -1730,7 +1730,7 @@ properties:
1730
1730
</properties>
1731
1731
```
1732
1732
1733
-
[/codeSelector]
1733
+
</code-selector>
1734
1734
1735
1735
[codeselector]
1736
1736
@@ -1811,7 +1811,7 @@ properties:
1811
1811
</properties>
1812
1812
```
1813
1813
1814
-
[/codeSelector]
1814
+
</code-selector>
1815
1815
1816
1816
The above example only allows admins to see the full collection of each resource (`QueryCollection`).
1817
1817
Users must be granted the `VIEW` attribute on a resource to be able to query it directly (`Query`) - which would use a `Voter` to make this decision.
@@ -1970,7 +1970,7 @@ resources:
1970
1970
</resources>
1971
1971
```
1972
1972
1973
-
[/codeSelector]
1973
+
</code-selector>
1974
1974
1975
1975
In this case, the REST endpoint will be able to get the two attributes of the book and to modify only its title.
1976
1976
@@ -2042,7 +2042,7 @@ resources:
2042
2042
</resources>
2043
2043
```
2044
2044
2045
-
[/codeSelector]
2045
+
</code-selector>
2046
2046
2047
2047
Creating a book with its author will be done like this, where `/authors/32` is the IRI of an existing resource:
0 commit comments