Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Add UpdateURL to graphql schema and resolvers #654

Closed
wants to merge 9 commits into from
Closed

Add UpdateURL to graphql schema and resolvers #654

wants to merge 9 commits into from

Conversation

oatovar
Copy link
Collaborator

@oatovar oatovar commented Apr 10, 2020

  • Update GraphQL Schema's AuthMutation to include updateURL.

  • Refactor to use single UrlInput in both updateURL and createURL.

  • Regenerate wired dependencies.

@magicoder10 magicoder10 changed the title Issue #239 - Update Schema Add URL mutation APIs to GraphQL Schema Apr 10, 2020
@@ -20,6 +20,8 @@ type AuthQuery {

type AuthMutation {
createURL(url: URLInput!, isPublic: Boolean!): URL
updateURL(alias: String!, url: URLInput!, isPublic: Boolean): URL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to discuss the isPublic parameter in the future.

@magicoder10
Copy link
Member

Hi @oatovar , thank you very much for working on this feature! I think you need to add GraphQL schema with resolvers. Please resolve PR conflicts!

@magicoder10 magicoder10 added this to the 04/04 - 04/10 milestone Apr 10, 2020
@magicoder10 magicoder10 added the enhancement New feature or request label Apr 10, 2020
Copy link
Member

@magicoder10 magicoder10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my previous comment.

@oatovar
Copy link
Collaborator Author

oatovar commented Apr 10, 2020

@byliuyang thank you for the feedback. I will take a look at the resolvers and fix the PR conflicts.

@oatovar oatovar marked this pull request as draft April 10, 2020 23:25
@magicoder10
Copy link
Member

@oatovar I recommend we open PRs in the direction of dependency graph:
image

  1. Repositories
  2. Use cases
  3. GraphQL resolvers & scheme

@oatovar oatovar changed the title Add URL mutation APIs to GraphQL Schema Add UpdateURL to graphql schema and resolvers May 20, 2020
@oatovar oatovar marked this pull request as ready for review May 20, 2020 03:02
@oatovar oatovar requested a review from arberiii as a code owner May 20, 2020 03:02
@oatovar
Copy link
Collaborator Author

oatovar commented May 20, 2020

@byliuyang I went with the solution that you recommend in #239. Please let me know where I can improve. Thank you!

@oatovar oatovar requested a review from magicoder10 May 20, 2020 03:06
oatovar added 9 commits May 20, 2020 20:41
* Add `URLUpdater` to url usecase

* Update dependency injection and generated code

* Update go module checksum
* Update UpdateURL args to satisfy schema changes.

* Clean up code layout
* Update schema to allow flexible changes i.e. one field or multiple fields

* Fix url `UPDATE` statement

* Remove `external` package imports

* Update dependency checksums
* Fix merge conflicts

* Tidy up go.sum
* Reduce URL input types to one for reuse

* Update CreateURL to use refactored URL input.

* Cleanup update creation so that it only runs at one level of
abstraction.

* Update `wire_gen.go`
@oatovar
Copy link
Collaborator Author

oatovar commented May 21, 2020

Closing and making new PR.

@oatovar oatovar closed this May 21, 2020
@oatovar oatovar deleted the features/url-mutation/schema-update branch May 21, 2020 02:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants