Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

**Create new deleteOrganization GraphQL mutation #275

Open
zichongkao opened this issue Apr 28, 2023 · 0 comments
Open

**Create new deleteOrganization GraphQL mutation #275

zichongkao opened this issue Apr 28, 2023 · 0 comments
Milestone

Comments

@zichongkao
Copy link
Contributor

Impact 2 (Since our feature can launch without this endpoint)
Complexity 2 (Probably 100-200 LoC including tests; but logic is fairly straightforward and design patterns already established)


Our GraphQL server currently supports 4 API endpoints:

  1. query organization to fetch a single organization given its orgId
  2. query organizations to search for one or more organizations that match a certain displayName or have a set of associatedAreaIds.
  3. mutation updateOrganization to update an organization
  4. mutation addOrganization to add an organization.

This task is to add mutation deleteOrganization. The wider intent is so that from our internal basecamp tool, admins can delete organizations using this endpoint rather than having to reach into our Mongo database and run commands. That's dangerous and prone to error.

You should be able to refer to #254. The codepaths would resemble mutation updateOrganization and mutation addOrganization quite closely. One way to think about it would be that there are three layers to implement:

  1. The outermost GraphQL layer that receives API calls.
  2. The middle Mongoose datastore objects that expose commands to the GraphQL resolvers.
  3. The inner Mongoose models/schemas that represent how data is stored in the MongoDB.
@dww3000 dww3000 added this to the next milestone May 18, 2023
@dww3000 dww3000 changed the title Create new deleteOrganization GraphQL mutation **Create new deleteOrganization GraphQL mutation May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants