Skip to content

Commit

Permalink
feat(hasura): using context env in action
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 21, 2023
1 parent f5875d3 commit 6a8a9c2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ lerna-debug.log*
uploads/
conf.yaml
tsconfig.build.tsbuildinfo
tsconfig.tsbuildinfo
*.pem*
1 change: 1 addition & 0 deletions docker-compose-hasura.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
HASURA_GRAPHQL_JWT_SECRET: '{"type": "RS256", "key": "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAq2k8+nAAR6EMS9/kk1yv30LkpWZlLYS5isTGnGSytB6xxl3nDR3q\nhFRBxQslpacrWbwilo1dnyI4GT4UHNwdPbzPf4WQbE7Y0SDRIfdUXw9DUuvLTqNU\ny/yBXaztIoRxDMSWg5pz736mdlCuAmzIfmN2cTSJYay2NPQ54rafZSYNnmqLBAQY\nofkD31vVMeicZX7hmmdolM1ymDZd2ufpVoH4Z6+I4QtBAu0oMPyL3rns6Wa5Fwrg\nbH9Y/GDJgYGA81dbW/jFq2W9yZetLNm2H9k/cO4EORdWqRFh0XH2utVEAWj3IKIy\nb5oAVnBlPGnBBrwNX5s8FVQGuLVE4VpeaQIDAQAB\n-----END RSA PUBLIC KEY-----"}'
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: 'anonymous'
ACTION_API_DOMAIN: 'http://172.27.10.137:3000'
# HASURA_GRAPHQL_ENABLED_APIS: graphql
depends_on:
data-connector-agent:
Expand Down
20 changes: 0 additions & 20 deletions hasura/metadata/actions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,8 @@ type Mutation {
): DeleteUserOutput
}

input DeleteUserInput {
email: String
}

type DeleteUserOutput {
error: Boolean
message: String
}

type LoginResponse {
accessToken: String!
}

type MyQueryOutput {
created_at: timestamptz
en_name: String
id: Int!
updated_at: timestamptz
vn_name: String
}

type TagsOutput {
tags: [MyQueryOutput]
}

8 changes: 2 additions & 6 deletions hasura/metadata/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ actions:
- name: delete_user
definition:
kind: synchronous
handler: http://api.dev.punkga.me/user
handler: '{{ACTION_API_DOMAIN}}/user'
forward_client_headers: true
request_transform:
method: DELETE
Expand All @@ -19,11 +19,7 @@ actions:
comment: delete user
custom_types:
enums: []
input_objects:
- name: DeleteUserInput
input_objects: []
objects:
- name: DeleteUserOutput
- name: LoginResponse
- name: MyQueryOutput
- name: TagsOutput
scalars: []

0 comments on commit 6a8a9c2

Please sign in to comment.