2018-09-11 14:11:24 +03:00
|
|
|
Customise schema with views
|
|
|
|
===========================
|
|
|
|
|
|
|
|
You may want to customise your GraphQL schema to:
|
|
|
|
|
2018-10-10 09:32:03 +03:00
|
|
|
- Limit scope (i.e. expose only a subset of the columns in a table)
|
|
|
|
- Fetch derived data (aggregations like *count, average, etc.*) in queries
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
These use-cases can be supported using database views.
|
|
|
|
|
|
|
|
You can create views `using SQL <https://www.postgresql.org/docs/9.6/static/sql-createview.html>`_ which you can
|
2018-10-10 09:32:03 +03:00
|
|
|
run using the console in the ``Data -> SQL`` section.
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
Please see the following pages for details about the above use-cases:
|
|
|
|
|
|
|
|
- :doc:`../queries/control-access`
|
|
|
|
|
2018-11-19 13:43:17 +03:00
|
|
|
- :doc:`../queries/derived-data`
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
|