File upload 'unable to parse the query'
Closed this issue · 10 comments
Describe the bug
Getting the following exception while uploading the media to the saleor.
Exception -> ('Exception while uploading the file -> ', "{'message': 'Unable to parse query.', 'extensions': {'exception': {'code': 'str', 'stacktrace': []}}}")
I'm trying to upload a file to graphql from an external Django application using gql to an e-commerce platform Saleor which is based on Django.
using below code
async def upload_media_to_saleor():
"""
This method is written to upload files to Saleor
Returns: response from Saleor else exceptional message
"""
params = {}
try:
query = """fragment FileFragment on File { url contentType __typename}fragment UploadErrorFragment on UploadError { code field __typename}mutation FileUpload($file: Upload!) { fileUpload(file: $file) { uploadedFile { ...FileFragment __typename } errors { ...UploadErrorFragment __typename } __typename }}"""
with open('/home/user_name/Downloads/sample_image.jpeg','rb') as f:
params = {"file" : f}
transport = AIOHTTPTransport(url=GRAPHQL_BASE_URL, headers=HEADERS)
async with Client(
transport=transport, fetch_schema_from_transport=False,
) as session:
query = gql(query)
response = await session.execute(
query,
variable_values=params,
upload_files=True
)
return response
except Exception as e:
message = "Exception while uploading the file -> ", str(e)
print(message)
return message
To Reproduce
Steps to reproduce the behavior:
Call this function in any one of the working functions.
Expected behavior
The file should get uploaded to the saleor backend.
System info (please complete the following information):
- OS: UBUNTU 20.04.3
- Python version: 3.08.10
- gql version: 3.1.0
- graphql-core version:
Please post the complete stack trace of the exception
I'm not getting any stack trace -> only the exception message as -> {'message': 'Unable to parse query.', 'extensions': {'exception': {'code': 'str', 'stacktrace': []}}}
I mean that you can remove your try: except:
block and let the code crash with the full stack trace so that I can know at least which exception is raised (a TransportQueryError
I assume)
If you could also enable debug logs and post here the resulting logs (all lines!)
And if you could also indent your GraphQL query on multiple lines instead of a single line it would be easier to read.
stack trace ->
Internal Server Error: /api/products/edit/upload_media/
Traceback (most recent call last):
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/rest_framework/decorators.py", line 50, in handler
return func(*args, **kwargs)
File "/var/www/projects/1_dev/django_backend/products/views.py", line 153, in edit_product_upload_media
response = asyncio.run(media_query_graphql())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/var/www/projects/1_dev/django_backend/django_backend/utils.py", line 77, in media_query_graphql
response = await session.execute(
File "/home/user/envs/saleor-django/lib/python3.8/site-packages/gql/client.py", line 1154, in execute
raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'message': 'Unable to parse query.', 'extensions': {'exception': {'code': 'str', 'stacktrace': []}}}
logging information ->
asyncio DEBUG Using selector: EpollSelector
gql.transport.aiohttp DEBUG operations {"query": "fragment FileFragment on File {\n url\n contentType\n __typename\n}\n\nfragment UploadErrorFragment on UploadError {\n code\n field\n __typename\n}\n\nmutation FileUpload($file: Upload!) {\n fileUpload(file: $file) {\n uploadedFile {\n ...FileFragment\n __typename\n }\n errors {\n ...UploadErrorFragment\n __typename\n }\n __typename\n }\n}", "variables": {"file": null}}
gql.transport.aiohttp DEBUG file_map {"0": ["variables.file"]}
gql.transport.aiohttp INFO <<< {"errors": [{"message": "Unable to parse query.", "extensions": {"exception": {"code": "str", "stacktrace": []}}}]}
Indented graphql query function ->
async def media_query_graphql():
"""
This method is written to upload media to Saleor
Returns: response from Saleor (error or success)
"""
params = {}
query = """fragment FileFragment on File { url contentType __typename}
fragment UploadErrorFragment on UploadError { code field __typename}
mutation FileUpload($file: Upload!) { fileUpload(file: $file)
{ uploadedFile { ...FileFragment __typename } errors
{ ...UploadErrorFragment __typename } __typename }}"""
with open('/home/user/Downloads/docker_joke.jpeg','rb') as f:
params = {"file" : f}
transport = AIOHTTPTransport(url=GRAPHQL_BASE_URL, headers=HEADERS)
async with Client(
transport=transport, fetch_schema_from_transport=False,
) as session:
query = gql(query)
response = await session.execute(
query,
variable_values=params,
upload_files=True
)
return response
Thanks. Could you please also try with fetch_schema_from_transport=True
to verify that your query correspond to the GraphQL schema? and post any errors in that case
Sharing graphql schema for more info ->
Everything else is fine I got this when set fetch_schema_from_transport=True
->
false, "deprecationReason": null}, {"name": "OUT_OF_SCOPE_USER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "OUT_OF_SCOPE_GROUP", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "OUT_OF_SCOPE_PERMISSION", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "PASSWORD_ENTIRELY_NUMERIC", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "PASSWORD_TOO_COMMON", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "PASSWORD_TOO_SHORT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "PASSWORD_TOO_SIMILAR", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "REQUIRED", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "UNIQUE", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "JWT_SIGNATURE_EXPIRED", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "JWT_INVALID_TOKEN", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "JWT_DECODE_ERROR", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "JWT_MISSING_TOKEN", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "JWT_INVALID_CSRF_TOKEN", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CHANNEL_INACTIVE", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "MISSING_CHANNEL_SLUG", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "ACCOUNT_NOT_CONFIRMED", "description": null, "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "OBJECT", "name": "RefreshToken", "description": "Refresh JWT token. Mutation tries to take refreshToken from the input.If it fails it will try to take refreshToken from the http-only cookie -refreshToken. csrfToken is required when refreshToken is provided as a cookie.", "fields": [{"name": "token", "description": "JWT token, required to authenticate.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": "A user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "VerifyToken", "description": "Verify JWT token.", "fields": [{"name": "user", "description": "User assigned to token.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isValid", "description": "Determine if token is valid or not.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "payload", "description": "JWT payload.", "args": [], "type": {"kind": "SCALAR", "name": "GenericScalar", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "SCALAR", "name": "GenericScalar", "description": "The
GenericScalarscalar type represents a generic\nGraphQL scalar value that could be:\nString, Boolean, Int, Float, List or Object.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "DeactivateAllUserTokens", "description": "Deactivate all JWT tokens of the currently authenticated user.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ExternalAuthenticationUrl", "description": "Prepare external authentication url for user by custom plugin.", "fields": [{"name": "authenticationData", "description": "The data returned by authentication plugin.", "args": [], "type": {"kind": "SCALAR", "name": "JSONString", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ExternalObtainAccessTokens", "description": "Obtain external access tokens for user by custom plugin.", "fields": [{"name": "token", "description": "The token, required to authenticate.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "refreshToken", "description": "The refresh token, required to re-generate external access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "csrfToken", "description": "CSRF token required to re-generate external access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": "A user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ExternalRefresh", "description": "Refresh user's access by custom plugin.", "fields": [{"name": "token", "description": "The token, required to authenticate.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "refreshToken", "description": "The refresh token, required to re-generate external access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "csrfToken", "description": "CSRF token required to re-generate external access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": "A user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ExternalLogout", "description": "Logout user by custom plugin.", "fields": [{"name": "logoutData", "description": "The data returned by authentication plugin.", "args": [], "type": {"kind": "SCALAR", "name": "JSONString", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ExternalVerify", "description": "Verify external authentication data by plugin.", "fields": [{"name": "user", "description": "User assigned to data.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isValid", "description": "Determine if authentication data is valid or not.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "verifyData", "description": "External data.", "args": [], "type": {"kind": "SCALAR", "name": "JSONString", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "RequestPasswordReset", "description": "Sends an email with the account password modification link.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ConfirmAccount", "description": "Confirm user account with token sent by email during registration.", "fields": [{"name": "user", "description": "An activated user account.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "SetPassword", "description": "Sets the user's password from the token sent by email using the RequestPasswordReset mutation.", "fields": [{"name": "token", "description": "JWT token, required to authenticate.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "refreshToken", "description": "JWT refresh token, required to re-generate access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "csrfToken", "description": "CSRF token required to re-generate access token.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": "A user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PasswordChange", "description": "Change the password of the logged in user.", "fields": [{"name": "user", "description": "A user instance with a new password.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "RequestEmailChange", "description": "Request email change of the logged in user.", "fields": [{"name": "user", "description": "A user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "ConfirmEmailChange", "description": "Confirm the email change of the logged-in user.", "fields": [{"name": "user", "description": "A user instance with a new email.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountAddressCreate", "description": "Create a new address for the customer.", "fields": [{"name": "user", "description": "A user instance for which the address was created.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountAddressUpdate", "description": "Updates an address of the logged-in user.", "fields": [{"name": "user", "description": "A user object for which the address was edited.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountAddressDelete", "description": "Delete an address of the logged-in user.", "fields": [{"name": "user", "description": "A user instance for which the address was deleted.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountSetDefaultAddress", "description": "Sets a default address for the authenticated user.", "fields": [{"name": "user", "description": "An updated user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountRegister", "description": "Register a new user.", "fields": [{"name": "requiresConfirmation", "description": "Informs whether users need to confirm their email address.", "args": [], "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "AccountRegisterInput", "description": null, "fields": null, "inputFields": [{"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "languageCode", "description": "User language code.", "type": {"kind": "ENUM", "name": "LanguageCodeEnum", "ofType": null}, "defaultValue": null}, {"name": "email", "description": "The email address of the user.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "password", "description": "Password.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}, {"name": "redirectUrl", "description": "Base of frontend URL that will be needed to create confirmation URL.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "metadata", "description": "User public metadata.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "INPUT_OBJECT", "name": "MetadataInput", "ofType": null}}}, "defaultValue": null}, {"name": "channel", "description": "Slug of a channel which will be used to notify users. Optional when only one channel exists.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountUpdate", "description": "Updates the account of the logged-in user.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "AccountInput", "description": null, "fields": null, "inputFields": [{"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "languageCode", "description": "User language code.", "type": {"kind": "ENUM", "name": "LanguageCodeEnum", "ofType": null}, "defaultValue": null}, {"name": "defaultBillingAddress", "description": "Billing address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}, {"name": "defaultShippingAddress", "description": "Shipping address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountRequestDeletion", "description": "Sends an email with the account removal link for the logged-in user.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AccountDelete", "description": "Remove user account.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AddressCreate", "description": "Creates user address.", "fields": [{"name": "user", "description": "A user instance for which the address was created.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AddressUpdate", "description": "Updates an address.", "fields": [{"name": "user", "description": "A user object for which the address was edited.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AddressDelete", "description": "Deletes an address.", "fields": [{"name": "user", "description": "A user instance for which the address was deleted.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "address", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Address", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "AddressSetDefault", "description": "Sets a default address for the given user.", "fields": [{"name": "user", "description": "An updated user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CustomerCreate", "description": "Creates a new customer.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "UserCreateInput", "description": null, "fields": null, "inputFields": [{"name": "defaultBillingAddress", "description": "Billing address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}, {"name": "defaultShippingAddress", "description": "Shipping address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}, {"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "email", "description": "The unique email address of the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isActive", "description": "User account is active.", "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "note", "description": "A note about the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "languageCode", "description": "User language code.", "type": {"kind": "ENUM", "name": "LanguageCodeEnum", "ofType": null}, "defaultValue": null}, {"name": "redirectUrl", "description": "URL of a view where users should be redirected to set the password. URL in RFC 1808 format.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "channel", "description": "Slug of a channel which will be used for notify user. Optional when only one channel exists.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CustomerUpdate", "description": "Updates an existing customer.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "CustomerInput", "description": null, "fields": null, "inputFields": [{"name": "defaultBillingAddress", "description": "Billing address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}, {"name": "defaultShippingAddress", "description": "Shipping address of the customer.", "type": {"kind": "INPUT_OBJECT", "name": "AddressInput", "ofType": null}, "defaultValue": null}, {"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "email", "description": "The unique email address of the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isActive", "description": "User account is active.", "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "note", "description": "A note about the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "languageCode", "description": "User language code.", "type": {"kind": "ENUM", "name": "LanguageCodeEnum", "ofType": null}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CustomerDelete", "description": "Deletes a customer.", "fields": [{"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "CustomerBulkDelete", "description": "Deletes customers.", "fields": [{"name": "count", "description": "Returns how many objects were affected.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "StaffCreate", "description": "Creates a new staff user.", "fields": [{"name": "staffErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "StaffError", "description": null, "fields": [{"name": "field", "description": "Name of a field that caused the error. A value of
nullindicates that the error isn't associated with a particular field.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "message", "description": "The error message.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "code", "description": "The error code.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "AccountErrorCode", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "addressType", "description": "A type of address that causes the error.", "args": [], "type": {"kind": "ENUM", "name": "AddressTypeEnum", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "permissions", "description": "List of permissions which causes the error.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionEnum", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "groups", "description": "List of permission group IDs which cause the error.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "users", "description": "List of user IDs which causes the error.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "StaffCreateInput", "description": null, "fields": null, "inputFields": [{"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "email", "description": "The unique email address of the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isActive", "description": "User account is active.", "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "note", "description": "A note about the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "addGroups", "description": "List of permission group IDs to which user should be assigned.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}, {"name": "redirectUrl", "description": "URL of a view where users should be redirected to set the password. URL in RFC 1808 format.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "StaffUpdate", "description": "Updates an existing staff user.", "fields": [{"name": "staffErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "StaffUpdateInput", "description": null, "fields": null, "inputFields": [{"name": "firstName", "description": "Given name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "lastName", "description": "Family name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "email", "description": "The unique email address of the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "isActive", "description": "User account is active.", "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": null}, {"name": "note", "description": "A note about the user.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "addGroups", "description": "List of permission group IDs to which user should be assigned.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}, {"name": "removeGroups", "description": "List of permission group IDs from which user should be unassigned.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "StaffDelete", "description": "Deletes a staff user.", "fields": [{"name": "staffErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "user", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "StaffBulkDelete", "description": "Deletes staff users.", "fields": [{"name": "count", "description": "Returns how many objects were affected.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "staffErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "StaffError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "UserAvatarUpdate", "description": "Create a user avatar. Only for staff members. This mutation must be sent as a
multipartrequest. More detailed specs of the upload format can be found here: https://github.com/jaydenseric/graphql-multipart-request-spec", "fields": [{"name": "user", "description": "An updated user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "UserAvatarDelete", "description": "Deletes a user avatar. Only for staff members.", "fields": [{"name": "user", "description": "An updated user instance.", "args": [], "type": {"kind": "OBJECT", "name": "User", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "UserBulkSetActive", "description": "Activate or deactivate users.", "fields": [{"name": "count", "description": "Returns how many objects were affected.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Int", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "accountErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "AccountError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PermissionGroupCreate", "description": "Create new permission group.", "fields": [{"name": "permissionGroupErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "group", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Group", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PermissionGroupError", "description": null, "fields": [{"name": "field", "description": "Name of a field that caused the error. A value of
nullindicates that the error isn't associated with a particular field.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "message", "description": "The error message.", "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "code", "description": "The error code.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionGroupErrorCode", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "permissions", "description": "List of permissions which causes the error.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionEnum", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "users", "description": "List of user IDs which causes the error.", "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "PermissionGroupErrorCode", "description": "An enumeration.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "ASSIGN_NON_STAFF_MEMBER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "DUPLICATED_INPUT_ITEM", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CANNOT_REMOVE_FROM_LAST_GROUP", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "LEFT_NOT_MANAGEABLE_PERMISSION", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "OUT_OF_SCOPE_PERMISSION", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "OUT_OF_SCOPE_USER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "REQUIRED", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "UNIQUE", "description": null, "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "PermissionGroupCreateInput", "description": null, "fields": null, "inputFields": [{"name": "addPermissions", "description": "List of permission code names to assign to this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionEnum", "ofType": null}}}, "defaultValue": null}, {"name": "addUsers", "description": "List of users to assign to this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}, {"name": "name", "description": "Group name.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PermissionGroupUpdate", "description": "Update permission group.", "fields": [{"name": "permissionGroupErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "group", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Group", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "INPUT_OBJECT", "name": "PermissionGroupUpdateInput", "description": null, "fields": null, "inputFields": [{"name": "addPermissions", "description": "List of permission code names to assign to this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionEnum", "ofType": null}}}, "defaultValue": null}, {"name": "addUsers", "description": "List of users to assign to this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}, {"name": "name", "description": "Group name.", "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "defaultValue": null}, {"name": "removePermissions", "description": "List of permission code names to unassign from this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "PermissionEnum", "ofType": null}}}, "defaultValue": null}, {"name": "removeUsers", "description": "List of users to unassign from this group.", "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "ID", "ofType": null}}}, "defaultValue": null}], "interfaces": null, "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "PermissionGroupDelete", "description": "Delete permission group.", "fields": [{"name": "permissionGroupErrors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": true, "deprecationReason": "This field will be removed in Saleor 4.0. Use
errorsfield instead."}, {"name": "errors", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "PermissionGroupError", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "group", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "Group", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Schema", "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation and subscription operations.", "fields": [{"name": "types", "description": "A list of all types supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "queryType", "description": "The type that query operations will be rooted at.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "mutationType", "description": "If this server supports mutation, the type that mutation operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "subscriptionType", "description": "If this server support subscription, the type that subscription operations will be rooted at.", "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "directives", "description": "A list of all directives supported by this server.", "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Directive", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Type", "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the
__TypeKindenum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", "fields": [{"name": "kind", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__TypeKind", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "name", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "fields", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Field", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "interfaces", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "possibleTypes", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "enumValues", "description": null, "args": [{"name": "includeDeprecated", "description": null, "type": {"kind": "SCALAR", "name": "Boolean", "ofType": null}, "defaultValue": "false"}], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__EnumValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "inputFields", "description": null, "args": [], "type": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "ofType", "description": null, "args": [], "type": {"kind": "OBJECT", "name": "__Type", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__TypeKind", "description": "An enum describing what kind of type a given
__Typeis", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "SCALAR", "description": "Indicates this type is a scalar.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Indicates this type is an object.
fieldsand
interfacesare valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Indicates this type is an interface.
fieldsand
possibleTypesare valid fields.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Indicates this type is a union.
possibleTypesis a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Indicates this type is an enum.
enumValuesis a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Indicates this type is an input object.
inputFieldsis a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "LIST", "description": "Indicates this type is a list.
ofTypeis a valid field.", "isDeprecated": false, "deprecationReason": null}, {"name": "NON_NULL", "description": "Indicates this type is a non-null.
ofTypeis a valid field.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "OBJECT", "name": "__Field", "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__InputValue", "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "type", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__Type", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "defaultValue", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__EnumValue", "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "isDeprecated", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "deprecationReason", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "OBJECT", "name": "__Directive", "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", "fields": [{"name": "name", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "String", "ofType": null}}, "isDeprecated": false, "deprecationReason": null}, {"name": "description", "description": null, "args": [], "type": {"kind": "SCALAR", "name": "String", "ofType": null}, "isDeprecated": false, "deprecationReason": null}, {"name": "locations", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "ENUM", "name": "__DirectiveLocation", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "args", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "LIST", "name": null, "ofType": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "OBJECT", "name": "__InputValue", "ofType": null}}}}, "isDeprecated": false, "deprecationReason": null}, {"name": "onOperation", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use
locations."}, {"name": "onFragment", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use
locations."}, {"name": "onField", "description": null, "args": [], "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "isDeprecated": true, "deprecationReason": "Use
locations."}], "inputFields": null, "interfaces": [], "enumValues": null, "possibleTypes": null}, {"kind": "ENUM", "name": "__DirectiveLocation", "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "QUERY", "description": "Location adjacent to a query operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "MUTATION", "description": "Location adjacent to a mutation operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "SUBSCRIPTION", "description": "Location adjacent to a subscription operation.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD", "description": "Location adjacent to a field.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_DEFINITION", "description": "Location adjacent to a fragment definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FRAGMENT_SPREAD", "description": "Location adjacent to a fragment spread.", "isDeprecated": false, "deprecationReason": null}, {"name": "INLINE_FRAGMENT", "description": "Location adjacent to an inline fragment.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCHEMA", "description": "Location adjacent to a schema definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "SCALAR", "description": "Location adjacent to a scalar definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "OBJECT", "description": "Location adjacent to an object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "FIELD_DEFINITION", "description": "Location adjacent to a field definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ARGUMENT_DEFINITION", "description": "Location adjacent to an argument definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INTERFACE", "description": "Location adjacent to an interface definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "UNION", "description": "Location adjacent to a union definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM", "description": "Location adjacent to an enum definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "ENUM_VALUE", "description": "Location adjacent to an enum value definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_OBJECT", "description": "Location adjacent to an input object definition.", "isDeprecated": false, "deprecationReason": null}, {"name": "INPUT_FIELD_DEFINITION", "description": "Location adjacent to an input object field definition.", "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "ENUM", "name": "DistanceUnitsEnum", "description": "An enumeration.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "CM", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "M", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "KM", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "FT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "YD", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "INCH", "description": null, "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "ENUM", "name": "AreaUnitsEnum", "description": "An enumeration.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "SQ_CM", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "SQ_M", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "SQ_KM", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "SQ_FT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "SQ_YD", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "SQ_INCH", "description": null, "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}, {"kind": "ENUM", "name": "VolumeUnitsEnum", "description": "An enumeration.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [{"name": "CUBIC_MILLIMETER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_CENTIMETER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_DECIMETER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_METER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "LITER", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_FOOT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_INCH", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "CUBIC_YARD", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "QT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "PINT", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "FL_OZ", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "ACRE_IN", "description": null, "isDeprecated": false, "deprecationReason": null}, {"name": "ACRE_FT", "description": null, "isDeprecated": false, "deprecationReason": null}], "possibleTypes": null}], "directives": [{"name": "include", "description": "Directs the executor to include this field or fragment only when the
ifargument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Included when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}, {"name": "skip", "description": "Directs the executor to skip this field or fragment when the
if argument is true.", "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [{"name": "if", "description": "Skipped when true.", "type": {"kind": "NON_NULL", "name": null, "ofType": {"kind": "SCALAR", "name": "Boolean", "ofType": null}}, "defaultValue": null}]}]}}, "extensions": {"cost": {"requestedQueryCost": 0, "maximumAvailable": 250}}} gql.transport.aiohttp DEBUG operations {"query": "fragment FileFragment on File {\n url\n contentType\n __typename\n}\n\nfragment UploadErrorFragment on UploadError {\n code\n field\n __typename\n}\n\nmutation FileUpload($file: Upload!) {\n fileUpload(file: $file) {\n uploadedFile {\n ...FileFragment\n __typename\n }\n errors {\n ...UploadErrorFragment\n __typename\n }\n __typename\n }\n}", "variables": {"file": null}}
Ok, now if I google "Unable to parse query" with Saleor, I arrive at this line in the saleor github.
Following on the parse_body
method a few lines above bring me to its definition
Apparently it will try parse the query depending on its content-type and try to json_decode it.
Now I am wondering what is the actual content-type header which is received by the backend.
- Do you have control of the backend and can you print the
content_type
received in theparse_body
method? - what is present in your
HEADERS
dictionary? Is it only authentication tokens or is there something else? Did you set the content-type header yourself?
Yes, I do have control of the backend.
I had content-type(application/json), and auth token inside headers.
will change it to content-type(multipart/form-data), try it, and will get back to you.
Also for your information, if you want to highlight multiple lines in GitHub comments, you can just select them and click the <>
button. It will add three backticks before and after your block of text.
Then if you want to add code hightlighting, you can add python
just after the three starting backticks, without a space.
So I am going to suppose that after the invalid header has been removed from the dictionary, it started working correctly.