2019-04-11 07:10:51 +02:00
|
|
|
app_name: "Super Graph Production"
|
2019-03-24 14:57:29 +01:00
|
|
|
host_port: 0.0.0.0:8080
|
2019-04-10 07:38:48 +02:00
|
|
|
web_ui: false
|
|
|
|
debug_level: 0
|
2019-04-20 06:35:57 +02:00
|
|
|
|
|
|
|
# disabled tracing enables query caching
|
2019-04-04 06:53:24 +02:00
|
|
|
enable_tracing: false
|
2019-03-24 14:57:29 +01:00
|
|
|
|
|
|
|
# Throw a 401 on auth failure for queries that need auth
|
|
|
|
# valid values: always, per_query, never
|
2019-04-10 07:38:48 +02:00
|
|
|
auth_fail_block: always
|
2019-03-24 14:57:29 +01:00
|
|
|
|
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-08 08:47:59 +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
|
|
|
|
# the user_id via a header. Good for testing
|
2019-04-08 08:47:59 +02:00
|
|
|
header: X-User-ID
|
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'
|
|
|
|
secret_key_base: 0a248500a64c01184edb4d7ad3a805488f8097ac761b76aaa6c17c01dcb7af03a2f18ba61b2868134b9c7b79a122bc0dadff4367414a2d173297bfea92be5566
|
|
|
|
|
|
|
|
# Remote cookie store. (memcache or redis)
|
|
|
|
# url: redis://127.0.0.1:6379
|
|
|
|
# password: test
|
|
|
|
# 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: ''
|
|
|
|
#pool_size: 10
|
|
|
|
#max_retries: 0
|
|
|
|
#log_level: "debug"
|
|
|
|
|
|
|
|
# Define variables here that you want to use in filters
|
|
|
|
variables:
|
|
|
|
account_id: "select account_id from users where id = $user_id"
|
|
|
|
|
2019-04-08 08:47:59 +02:00
|
|
|
# Define defaults to for the field key and values below
|
|
|
|
defaults:
|
2019-04-09 03:24:29 +02:00
|
|
|
filter: ["{ user_id: { eq: $user_id } }"]
|
2019-04-08 08:47:59 +02:00
|
|
|
|
|
|
|
# Fields and table names that you wish to block
|
|
|
|
blacklist:
|
|
|
|
- ar_internal_metadata
|
|
|
|
- schema_migrations
|
|
|
|
- secret
|
|
|
|
- password
|
|
|
|
- encrypted
|
|
|
|
- token
|
2019-03-24 14:57:29 +01:00
|
|
|
|
2019-04-08 08:47:59 +02:00
|
|
|
fields:
|
|
|
|
- name: users
|
2019-04-10 07:38:48 +02:00
|
|
|
# This filter will overwrite defaults.filter
|
2019-04-09 03:24:29 +02:00
|
|
|
filter: ["{ id: { eq: $user_id } }"]
|
2019-03-24 14:57:29 +01:00
|
|
|
|
2019-04-09 03:24:29 +02:00
|
|
|
- name: products
|
2019-04-10 07:38:48 +02:00
|
|
|
# Multiple filters are AND'd together
|
2019-04-09 03:24:29 +02:00
|
|
|
filter: [
|
|
|
|
"{ price: { gt: 0 } }",
|
|
|
|
"{ price: { lt: 8 } }"
|
|
|
|
]
|
|
|
|
|
|
|
|
- name: customers
|
2019-04-10 07:38:48 +02:00
|
|
|
# No filter is used for this field not
|
|
|
|
# even defaults.filter
|
2019-04-09 03:24:29 +02:00
|
|
|
filter: none
|
2019-04-08 08:47:59 +02:00
|
|
|
|
2019-04-10 07:38:48 +02:00
|
|
|
- # You can create new fields that have a
|
|
|
|
# real db table backing them
|
|
|
|
name: me
|
2019-04-09 03:24:29 +02:00
|
|
|
table: users
|
|
|
|
filter: ["{ id: { eq: $user_id } }"]
|
|
|
|
|
|
|
|
# - name: posts
|
|
|
|
# filter: ["{ account_id: { _eq: $account_id } }"]
|