Query Targets
The second part of every RONIN query is its target (“query target”).
Every query is aimed at a particular schema, which is addressed using either the Slug or the Plural Slug of the respective schema. Both can be found in the “Settings” section of the schema on the dashboard.
-
Using the Slug will result in a singular record getting addressed. Specifically, the most recently created record that matches the query.
-
Using the Plural Slug will result in multiple records getting addressed. Specifically, all existing records that match the provided query, ordered by their creation date.
Formatting
In the “Settings” section of every schema on the dashboard, both the Slug and the Plural Slug must be provided in camel case, in order to make it easy to re-use the slugs in RONIN queries.
For example, the following Slug and Plural Slug are allowed:
blogPost
blogPosts
While the following are not allowed:
BlogPost
BlogPosts
blog post
blog posts
blog_post
blog_posts
Limitations
-
Queries of type
create
currently only support providing a Slug, not a Plural Slug, as only one record can be created at a time. You may create multiple records at once, by executing multiple queries. A query such ascreate.accounts()
is therefore not supported, whilecreate.account()
is supported. -
Queries of type
count
only support providing a Plural Slug, not a Slug, as the query type is used for counting records, and if there is a guarantee that there will be only a single record, counting them is not needed. A query such ascount.blogPost()
is therefore not supported, whilecount.blogPosts()
is supported.