2019-04-11 07:10:51 +02:00
|
|
|
|
app_name: "Super Graph Development"
|
2019-03-24 14:57:29 +01:00
|
|
|
|
host_port: 0.0.0.0:8080
|
|
|
|
|
web_ui: true
|
2019-06-17 07:58:00 +02:00
|
|
|
|
|
|
|
|
|
# debug, info, warn, error, fatal, panic
|
|
|
|
|
log_level: "debug"
|
2019-04-20 06:35:57 +02:00
|
|
|
|
|
2019-11-07 08:37:24 +01:00
|
|
|
|
# When production mode is 'true' only queries
|
|
|
|
|
# from the allow list are permitted.
|
|
|
|
|
# When it's 'false' all queries are saved to the
|
|
|
|
|
# the allow list in ./config/allow.list
|
2019-11-19 06:47:55 +01:00
|
|
|
|
production: false
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
|
|
|
|
# Throw a 401 on auth failure for queries that need auth
|
2019-11-02 22:13:17 +01:00
|
|
|
|
auth_fail_block: false
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-07-29 07:13:33 +02:00
|
|
|
|
# Latency tracing for database queries and remote joins
|
|
|
|
|
# the resulting latency information is returned with the
|
|
|
|
|
# response
|
|
|
|
|
enable_tracing: true
|
|
|
|
|
|
2019-09-08 20:56:32 +02:00
|
|
|
|
# Watch the config folder and reload Super Graph
|
|
|
|
|
# with the new configs when a change is detected
|
2019-10-24 08:07:42 +02:00
|
|
|
|
reload_on_config_change: true
|
2019-09-08 20:56:32 +02:00
|
|
|
|
|
2019-09-26 06:35:31 +02:00
|
|
|
|
# File that points to the database seeding script
|
|
|
|
|
# seed_file: seed.js
|
|
|
|
|
|
|
|
|
|
# Path pointing to where the migrations can be found
|
|
|
|
|
migrations_path: ./config/migrations
|
|
|
|
|
|
2019-04-01 07:18:14 +02:00
|
|
|
|
# Postgres related environment Variables
|
2019-03-24 14:57:29 +01:00
|
|
|
|
# SG_DATABASE_HOST
|
|
|
|
|
# SG_DATABASE_PORT
|
|
|
|
|
# SG_DATABASE_USER
|
|
|
|
|
# SG_DATABASE_PASSWORD
|
|
|
|
|
|
2019-04-01 07:18:14 +02:00
|
|
|
|
# Auth related environment Variables
|
2019-04-08 08:47:59 +02:00
|
|
|
|
# SG_AUTH_RAILS_COOKIE_SECRET_KEY_BASE
|
|
|
|
|
# SG_AUTH_RAILS_REDIS_URL
|
|
|
|
|
# SG_AUTH_RAILS_REDIS_PASSWORD
|
|
|
|
|
# SG_AUTH_JWT_PUBLIC_KEY_FILE
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
|
|
|
|
# inflections:
|
|
|
|
|
# person: people
|
|
|
|
|
# sheep: sheep
|
|
|
|
|
|
2019-04-13 16:30:02 +02:00
|
|
|
|
auth:
|
2019-04-10 07:38:48 +02:00
|
|
|
|
# Can be 'rails' or 'jwt'
|
|
|
|
|
type: rails
|
2019-04-08 08:47:59 +02:00
|
|
|
|
cookie: _app_session
|
2019-04-10 07:38:48 +02:00
|
|
|
|
|
|
|
|
|
# Comment this out if you want to disable setting
|
2019-11-05 05:44:42 +01:00
|
|
|
|
# the user_id via a header for testing.
|
|
|
|
|
# Disable in production
|
2019-10-24 08:07:42 +02:00
|
|
|
|
creds_in_header: true
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-04-10 07:38:48 +02:00
|
|
|
|
rails:
|
|
|
|
|
# Rails version this is used for reading the
|
|
|
|
|
# various cookies formats.
|
|
|
|
|
version: 5.2
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-04-10 07:38:48 +02:00
|
|
|
|
# Found in 'Rails.application.config.secret_key_base'
|
2019-06-04 17:26:06 +02:00
|
|
|
|
secret_key_base: 0a248500a64c01184edb4d7ad3a805488f8097ac761b76aaa6c17c01dcb7af03a2f18ba61b2868134b9c7b79a122bc0dadff4367414a2d173297bfea92be5566
|
2019-04-13 16:30:02 +02:00
|
|
|
|
|
2019-04-10 07:38:48 +02:00
|
|
|
|
# Remote cookie store. (memcache or redis)
|
2019-04-13 16:30:02 +02:00
|
|
|
|
# url: redis://redis:6379
|
|
|
|
|
# password: ""
|
|
|
|
|
# max_idle: 80
|
|
|
|
|
# max_active: 12000
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-04-10 07:38:48 +02:00
|
|
|
|
# In most cases you don't need these
|
|
|
|
|
# salt: "encrypted cookie"
|
|
|
|
|
# sign_salt: "signed encrypted cookie"
|
|
|
|
|
# auth_salt: "authenticated encrypted cookie"
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-04-08 08:47:59 +02:00
|
|
|
|
# jwt:
|
|
|
|
|
# provider: auth0
|
|
|
|
|
# secret: abc335bfcfdb04e50db5bb0a4d67ab9
|
|
|
|
|
# public_key_file: /secrets/public_key.pem
|
|
|
|
|
# public_key_type: ecdsa #rsa
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
|
|
|
|
database:
|
|
|
|
|
type: postgres
|
|
|
|
|
host: db
|
|
|
|
|
port: 5432
|
|
|
|
|
dbname: app_development
|
|
|
|
|
user: postgres
|
|
|
|
|
password: ''
|
2019-04-13 16:30:02 +02:00
|
|
|
|
|
2019-04-11 07:10:51 +02:00
|
|
|
|
#schema: "public"
|
2019-03-24 14:57:29 +01:00
|
|
|
|
#pool_size: 10
|
|
|
|
|
#max_retries: 0
|
2019-04-13 16:30:02 +02:00
|
|
|
|
#log_level: "debug"
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-11-05 05:44:42 +01:00
|
|
|
|
# Set session variable "user.id" to the user id
|
|
|
|
|
# Enable this if you need the user id in triggers, etc
|
|
|
|
|
set_user_id: false
|
|
|
|
|
|
2019-04-13 16:30:02 +02:00
|
|
|
|
# Define variables here that you want to use in filters
|
2019-09-05 06:09:56 +02:00
|
|
|
|
# sub-queries must be wrapped in ()
|
2019-03-24 14:57:29 +01:00
|
|
|
|
variables:
|
2019-09-05 06:09:56 +02:00
|
|
|
|
account_id: "(select account_id from users where id = $user_id)"
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-04-08 08:47:59 +02:00
|
|
|
|
# Define defaults to for the field key and values below
|
|
|
|
|
defaults:
|
2019-10-25 07:39:59 +02:00
|
|
|
|
# filters: ["{ user_id: { eq: $user_id } }"]
|
2019-04-13 16:30:02 +02:00
|
|
|
|
|
2019-05-13 01:27:26 +02:00
|
|
|
|
# Field and table names that you wish to block
|
2019-09-08 07:54:38 +02:00
|
|
|
|
blocklist:
|
2019-04-08 08:47:59 +02:00
|
|
|
|
- ar_internal_metadata
|
|
|
|
|
- schema_migrations
|
|
|
|
|
- secret
|
|
|
|
|
- password
|
|
|
|
|
- encrypted
|
|
|
|
|
- token
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
2019-10-06 22:28:10 +02:00
|
|
|
|
tables:
|
|
|
|
|
- name: customers
|
|
|
|
|
remotes:
|
|
|
|
|
- name: payments
|
|
|
|
|
id: stripe_id
|
|
|
|
|
url: http://rails_app:3000/stripe/$id
|
|
|
|
|
path: data
|
|
|
|
|
# debug: true
|
|
|
|
|
pass_headers:
|
|
|
|
|
- cookie
|
|
|
|
|
set_headers:
|
|
|
|
|
- name: Host
|
|
|
|
|
value: 0.0.0.0
|
|
|
|
|
# - name: Authorization
|
|
|
|
|
# value: Bearer <stripe_api_key>
|
|
|
|
|
|
|
|
|
|
- # You can create new fields that have a
|
|
|
|
|
# real db table backing them
|
|
|
|
|
name: me
|
|
|
|
|
table: users
|
|
|
|
|
|
2019-11-05 05:44:42 +01:00
|
|
|
|
roles_query: "SELECT * FROM users WHERE id = $user_id"
|
2019-10-24 08:07:42 +02:00
|
|
|
|
|
2019-10-14 08:51:36 +02:00
|
|
|
|
roles:
|
|
|
|
|
- name: anon
|
|
|
|
|
tables:
|
|
|
|
|
- name: products
|
|
|
|
|
limit: 10
|
|
|
|
|
|
|
|
|
|
query:
|
|
|
|
|
columns: ["id", "name", "description" ]
|
|
|
|
|
aggregation: false
|
|
|
|
|
|
|
|
|
|
insert:
|
2019-10-26 07:34:29 +02:00
|
|
|
|
block: false
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
|
|
|
|
update:
|
2019-10-26 07:34:29 +02:00
|
|
|
|
block: false
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
|
|
|
|
delete:
|
2019-10-26 07:34:29 +02:00
|
|
|
|
block: false
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
|
|
|
|
- name: user
|
|
|
|
|
tables:
|
2019-10-24 08:07:42 +02:00
|
|
|
|
- name: users
|
|
|
|
|
query:
|
2019-10-25 07:39:59 +02:00
|
|
|
|
filters: ["{ id: { _eq: $user_id } }"]
|
2019-10-24 08:07:42 +02:00
|
|
|
|
|
2019-10-14 08:51:36 +02:00
|
|
|
|
- name: products
|
|
|
|
|
query:
|
|
|
|
|
limit: 50
|
2019-10-25 07:39:59 +02:00
|
|
|
|
filters: ["{ user_id: { eq: $user_id } }"]
|
2019-10-14 08:51:36 +02:00
|
|
|
|
columns: ["id", "name", "description" ]
|
2019-10-27 06:52:48 +01:00
|
|
|
|
disable_functions: false
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
|
|
|
|
insert:
|
2019-10-25 07:39:59 +02:00
|
|
|
|
filters: ["{ user_id: { eq: $user_id } }"]
|
2019-10-14 08:51:36 +02:00
|
|
|
|
columns: ["id", "name", "description" ]
|
2019-10-30 08:27:11 +01:00
|
|
|
|
presets:
|
2019-10-25 07:39:59 +02:00
|
|
|
|
- created_at: "now"
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
|
|
|
|
update:
|
2019-10-25 07:39:59 +02:00
|
|
|
|
filters: ["{ user_id: { eq: $user_id } }"]
|
2019-10-14 08:51:36 +02:00
|
|
|
|
columns:
|
|
|
|
|
- id
|
|
|
|
|
- name
|
2019-10-30 08:27:11 +01:00
|
|
|
|
presets:
|
2019-10-14 08:51:36 +02:00
|
|
|
|
- updated_at: "now"
|
|
|
|
|
|
|
|
|
|
delete:
|
2019-10-26 07:34:29 +02:00
|
|
|
|
block: true
|
2019-10-14 08:51:36 +02:00
|
|
|
|
|
2019-10-24 08:07:42 +02:00
|
|
|
|
- name: admin
|
|
|
|
|
match: id = 1
|
2019-10-14 08:51:36 +02:00
|
|
|
|
tables:
|
|
|
|
|
- name: users
|
2019-10-25 07:39:59 +02:00
|
|
|
|
# query:
|
|
|
|
|
# filters: ["{ account_id: { _eq: $account_id } }"]
|