Skip to content

Commit

Permalink
breaking change endpoints
Browse files Browse the repository at this point in the history
DELETE /schema/delete/:schemaId -> DELETE /schema/:schemaId
DELETE /service/delete/:name -> DELETE /service/:name
  • Loading branch information
tot-ra committed Oct 1, 2021
1 parent 6266e4c commit 9e90352
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 15,350 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [2.0.0] - 2021-10-01
### Added
- New endpoint to hard-delete schemas of specific service
DELETE /schema/:schemaId

### Breaking Change
- Renamed endpoint that deactivates specific schema
Before:
DELETE /schema/delete/:schemaId

After:
DELETE /schema/:schemaId

## [1.2.5] - 2021-06-02

Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ Migrations are done using knex
nvm use
npm install
npm run build
docker-compose up -f docker-compose.dev.yml
docker-compose -f docker-compose.dev.yml up
```

### Running in light mode

To have fast iteration of working on UI changes, you can avoid running node service in docker, and run only mysql & redis

```
docker-compose up -f docker-compose.light.yml
docker-compose -f docker-compose.light.yml up
DB_HOST=localhost DB_PORT=6000 REDIS_HOST=localhost REDIS_PORT=6004 PORT=6001 node schema-registry.js
```

Expand All @@ -143,18 +143,22 @@ DB_HOST=my-db-host DB_PORT=6000 npm run migrate-db
```

### Contribution
- Commit often (instead of making huge commits)
- Add verb at the beginning of commit message
- Add why you're doing something in commit message
- Reference issues
- When making a pull request, be sure to follow the format of what is the problem you're fixing, what was changed & how to test it. Screenshots/videos are a welcome
- Fill [CHANGELOG](CHANGELOG.md)

- Before making PR, make sure to run `npm run version` & fill [CHANGELOG](CHANGELOG.md)
- Ping [@tot-ra](https://github.com/tot-ra) if PR is stuck

#### Honorable mentions

Original internal mission that resulted in this project consisted of (in alphabetical order):
#### Authors and acknowledgment
Current maintainer - [@tot-ra](https://github.com/tot-ra). Mention in PR, if it is stuck

Original internal mission that resulted in this project going live:
- [aleksandergasna](https://github.com/aleksandergasna)
- [ErikSchults](https://github.com/ErikSchults)
- [LexSwed](https://github.com/LexSwed)
- [tot-ra](https://github.com/tot-ra)

See main [blog post](https://medium.com/pipedrive-engineering/journey-to-federated-graphql-2a6f2eecc6a4)

## Rest API documentation

Expand Down Expand Up @@ -262,7 +266,7 @@ Compares schemas and finds breaking or dangerous changes between provided and la
- version
- type_defs

#### DELETE /schema/delete/:schemaId
#### DELETE /schema/:schemaId

Deletes specified schema

Expand All @@ -272,7 +276,7 @@ Deletes specified schema
| ------------------------- | ------- | ----------------------------------- |
| `schemaId` | number | ID of sechema |

#### DELETE /service/delete/:name
#### DELETE /service/:name

Deletes specified service including all schemas registered for that service

Expand Down
4 changes: 2 additions & 2 deletions app/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ router.post('/schema/compose', asyncWrap(schema.compose));
router.post('/schema/push', asyncWrap(schema.push));
router.post('/schema/diff', asyncWrap(schema.diff));

router.delete('/schema/delete/:schemaId', asyncWrap(schema.delete));
router.delete('/schema/:schemaId', asyncWrap(schema.delete));
router.post('/schema/validate', asyncWrap(schema.validate));

router.delete('/service/delete/:name', asyncWrap(service.delete));
router.delete('/service/:name', asyncWrap(service.delete));

module.exports = router;
Loading

0 comments on commit 9e90352

Please sign in to comment.