GraphQL requests

{{ tokens ? tokens|length : 'No' }} HTTP queries on GraphQL endpoint(s)

Refresh with latest query
{% if tokens %} {% for result in tokens %} {% set graphql = result.graphql %} {% set css_class = result.status_code|default(0) > 399 ? 'status-error' : result.status_code|default(0) > 299 ? 'status-warning' : 'status-success' %}
{{ result.status_code|default('n/a') }} {{ result.time|date }} {% if schemas|length > 0 and graphql.schema %} schema: {{ graphql.schema }} {% endif %} {{ result.token }}
{% for idx, batch in graphql.batches %} {% set isCurrentToken = result.token == token %} {% endfor %}
# Time Info
{{ idx + 1}} {{ (batch.queryTime*1000)|round(0) }} ms
{% if batch.error is defined %}
{% if batch.error.location is defined %} At line {{ batch.error.location.line}}, column {{ batch.error.location.column}}
{% endif %} {{ batch.error.message }}
{% endif %} {% if batch.graphql.operation is defined %} {% set operation = batch.graphql.operation %} {% set operationName = batch.graphql.operationName %} {% set fields = batch.graphql.fields %}
{{ operation }} {% if operationName %}{{ operationName }}(...){% endif %} { {% for field in fields %}
{% if field.alias %}{{field.alias }}: {% endif %}{{ field.name}}(...)
{% endfor %} }
{% endif %} {% if isCurrentToken %}
Variables: {{ profiler_dump(batch.variables, maxDepth=2) }}
{{ batch.queryString }}
{{ profiler_dump(batch.result, maxDepth=3) }}
{% else %} {% endif %}
{% endfor %} {% else %}

No GraphQL queries stored.

{% endif %}
{% for name, schema in schemas %}

Schema: {{ name }}

{{schema}}
{% endfor %}