Skip to content

Commit

Permalink
chore: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Jul 21, 2023
1 parent 9bc2412 commit 93074a7
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions packages/testing/addon/mirage-graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2424,19 +2424,38 @@ input QuestionFilterSetType {
"""
Question jexl expression returning boolean.
Following transform can be used:
* answer - access answer of document by question slug
* mapby - map list by key. Helpful to work with table answers
Following transforms can be used:
* `answer`: get answer of document by question slug
* `mapby`: map list by key. Helpful to work with table answers
whereas an answer is a list of dicts.
* `stringify`: JSON stringify
* `flatten`: flatten list values
* `min`: get min value in a list
* `max`: get max value in a list
* `sum`: sum of a list
* `round`: round the value
* `ceil`: round value up
* `floor`: round value down
* `debug`: debug output
Following binary operators can be used:
* `intersects`: list intersection operator
Following context is available:
* form - access form of document
* `form`: legacy property pointing to the root form (this should not be used anymore)
* `info.form`: slug of the form this question is attached to
* `info.formMeta`: meta property of the form this question is attached to
* `info.parent.form`: parent form slug
* `info.parent.formMeta`: parent form meta property
* `info.root.form`: top level form slug
* `info.root.formMeta`: top level form meta property
Examples:
* 'answer' == 'question-slug'|answer
* 'answer' in 'list-question-slug'|answer
* 'answer' in 'table-question-slug'|answer|mapby('column-question')
* 'form-slug' == form
* 'answer' in 'table-question-slug'|answer|mapby('multiple-choice-question')|flatten
* 'form-slug' == info.form
"""
scalar QuestionJexl

Expand Down

0 comments on commit 93074a7

Please sign in to comment.