{% extends "_layouts/cp" %} {% set title = "GraphQL Schemas"|t('app') %} {% requireEdition CraftPro %} {% set selectedSubnavItem = 'schemas' %} {% macro timestampCell(title, value) %} {% if value %} {{ value|timestamp }} {% else %} {{ 'Never'|t('app') }} {% endif %} {% endmacro %} {% block content %} {% set schemas = craft.app.gql.schemas %} {% for schema in schemas %} {{ _self.timestampCell('Last Used'|t('app'), schema.lastUsed) }} {{ _self.timestampCell('Expires'|t('app'), schema.expiryDate) }} {% endfor %}
{{ "Schema name"|t('app') }} {{ "Enabled"|t('app') }} {{ "Last Used"|t('app') }} {{ "Expires"|t('app') }}
{{ schema.isPublic ? 'Public Schema'|t('app') : schema.name }} {% if schema.enabled %}
{% endif %}
{% if not schema.isPublic %} {% endif %}
{{ "New schema"|t('app') }}
{% endblock %} {% js on ready %} new Craft.AdminTable({ tableSelector: '#schemas', minItems: 1, sortable: false, deleteAction: 'graphql/delete-schema' }); {% endjs %}