Skip to content

Commit

Permalink
upgrade ndc-http v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Dec 13, 2024
1 parent 4b6ddfd commit f8e874a
Show file tree
Hide file tree
Showing 7 changed files with 17,682 additions and 18,101 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ghcr.io/hasura/ndc-rest:v0.3.0
FROM ghcr.io/hasura/ndc-http:v0.7.0

COPY ./config /etc/connector
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
NDC_REST_VERSION ?= v0.3.0
NDC_HTTP_VERSION ?= v0.7.0
UID ?= $(shell id -u)
GID ?= $(shell id -g)

# go install github.com/hasura/ndc-http/ndc-http-schema@latest
.PHONY: build-schema
build-schema:
go install github.com/hasura/ndc-rest/ndc-rest-schema@latest
ndc-rest-schema convert \
-c schema/config.yaml \
ndc-http-schema convert \
-c generator/config.yaml \
-o config/schema.json

.PHONY: update-deps
update-deps:
VERSION=$(NDC_REST_VERSION) scripts/update-deps.sh
VERSION=$(NDC_HTTP_VERSION) scripts/update-deps.sh
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Stripe connector provides instant queries and mutations to request Stripe API resources.

This connector is built using the [NDC Rest](https://github.com/hasura/ndc-rest) with [Stripe's OpenAPI Specification](https://github.com/stripe/openapi).
This connector is built using the [HTTP Connector](https://github.com/hasura/ndc-http) with [Stripe's OpenAPI Specification](https://github.com/stripe/openapi).

## Environment Variables

Expand All @@ -14,7 +14,6 @@ This connector is built using the [NDC Rest](https://github.com/hasura/ndc-rest)
| STRIPE_TIMEOUT | Default request timeout in seconds | 30 |
| STRIPE_RETRY_TIMES | Number of retry times | 0 |
| STRIPE_RETRY_DELAY | Delay time between each retry in milliseconds | 1000 |
| STRIPE_RETRY_HTTP_STATUS | Retry on HTTP status | 429, 500, 502, 503 |

## Development

Expand All @@ -31,7 +30,7 @@ The connector serves the HTTP service at `http://localhost:8080` and connect to
### Update dependencies

```sh
NDC_REST_VERSION=<version> make update-deps
NDC_HTTP_VERSION=<version> make update-deps
```

### Update schema
Expand Down
21 changes: 21 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/hasura/ndc-http/refs/heads/main/ndc-http-schema/jsonschema/configuration.schema.json
strict: false
forwardHeaders:
enabled: false
argumentField: null
responseHeaders: null
concurrency:
query: 1
mutation: 1
http: 1
files:
- file: schema.json
spec: ndc
timeout:
env: STRIPE_TIMEOUT
value: 30
retry:
times:
env: STRIPE_RETRY_TIMES
value: 1
delay:
env: STRIPE_RETRY_DELAY
value: 1000
httpStatus: [429, 500, 502, 503]
Loading

0 comments on commit f8e874a

Please sign in to comment.