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
Support specifying session configs in http and graphql endpoints (#9110)
For http we add a `config` parameter, and for graphql we add a
`__config__` key to `variables` (mirroring the newer and more graphql
standard compliant way for globals).
I made dbview responsible for loading the config, like it is for binary
proto state (with `decode_state`).
Copy file name to clipboardExpand all lines: docs/reference/using/http.rst
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,23 +86,25 @@ example showing how you might send the query ``select Person {*};`` using cURL:
86
86
87
87
.. lint-on
88
88
89
-
.. _ref_edgeqlql_protocol:
89
+
.. _ref_edgeql_protocol:
90
90
91
91
Querying
92
92
========
93
93
94
94
|Gel| supports GET and POST methods for handling EdgeQL over HTTP protocol. Both GET and POST methods use the following fields:
95
95
96
96
- ``query`` - contains the EdgeQL query string
97
-
- ``variables``- contains a JSON object where the keys are the parameter names from the query and the values are the arguments to be used in this execution of the query.
98
-
- ``globals``- contains a JSON object where the keys are the fully qualified global names and the values are the desired values for those globals.
97
+
- ``variables``- contains a JSON object where the keys are the parameter names from the query and the values are the arguments to be used in this execution of the query. **Optional**
98
+
- ``globals``- contains a JSON object where the keys are the fully qualified global names and the values are the desired values for those globals. **Optional**
99
+
100
+
- ``config`` - contains a JSON object where the keys are configuration option names and the values are the desired values for those configs. **Optional**. **Added in 7.0.**
99
101
100
102
The protocol supports HTTP Keep-Alive.
101
103
102
104
GET request
103
105
-----------
104
106
105
-
The HTTP GET request passes the fields as query parameters: ``query`` string and JSON-encoded ``variables`` mapping.
107
+
The HTTP GET request passes the fields as query parameters: ``query`` string and JSON-encoded ``variables``, ``globals``, and ``config`` mappings.
106
108
107
109
108
110
POST request
@@ -115,7 +117,8 @@ The POST request should use ``application/json`` content type and submit the fol
115
117
{
116
118
"query": "select Person {*} filter .name = <str>$name;",
The :ref:`GraphQL <ref_graphql_protocol>` and :ref:`EdgeQL HTTP <ref_edgeql_protocol>` interfaces now support passing in session configuration variables.
128
+
129
+
If you are exposing HTTP/GraphQL endpoints to users and relying on them not being able to perform configuration, you will need to instead have them use roles that have not been given permission to modify sensitive configs.
0 commit comments