{% import '_includes/forms' as forms %}

Fields

{{ forms.field({ instructions: 'For each schema, you can choose which fields are forbidden from being accessed through queries and mutations. Any attempts to access a restricted field will cause the request to throw.', first: true, }, '') }}
{% for schema in schemaOptions %} {% if schema.value != '' %} {% endif %} {% endfor %} {% for field in fields %} {% set first = loop.first %} {% for schema in schemaOptions %} {% if schema.value != '' %} {% set schemaKey = 'schema-' ~ schema.value %} {% endif %} {% endfor %} {% endfor %}
Field {{ schema.label }}
{{ forms.field({ label: field.name, instructions: "(" ~ field.handle ~ ")", }, '') }} {{ forms.selectField({ name: 'fieldRestrictions[' ~ schemaKey ~ '][' ~ field.handle ~ ']', value: settings.fieldRestrictions[schemaKey][field.handle] ?? 'queryMutate', options: [ { value: 'queryMutate', label: 'Query & Mutate' }, { value: 'query', label: 'Query' }, { value: 'private', label: 'Private' }, ], }) }}