-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Graphql, Web: pull from and push to remotes #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. A few copy edits and graphql types comments
web/renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/RemoteRow.tsx
Outdated
Show resolved
Hide resolved
web/renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PullFromModal.tsx
Outdated
Show resolved
Hide resolved
...renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PushToRemoteModal.tsx
Outdated
Show resolved
Hide resolved
...renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PushToRemoteModal.tsx
Outdated
Show resolved
Hide resolved
...renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PushToRemoteModal.tsx
Outdated
Show resolved
Hide resolved
web/renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PullFromModal.tsx
Outdated
Show resolved
Hide resolved
...renderer/components/pageComponents/DatabasePage/ForRemotes/RemotesPage/PushToRemoteModal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more small things but otherwise lgtm
graphql-server/schema.gql
Outdated
@@ -291,6 +291,17 @@ type RemoteList { | |||
list: [Remote!]! | |||
} | |||
|
|||
type PullRes { | |||
fastForward: Boolean! | |||
conflicts: Float! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need _type => Int
in this Field in the model
|
||
export function fromPullRes(r: RawRow): PullRes { | ||
return { | ||
fastForward: r.fast_forward !== "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should both be r.fast_forward === "1"
. In case some weird int gets in there you want it to be false in all circumstances except for 1
|
||
export function fromPushRes(r: RawRow): PushRes { | ||
return { | ||
status: r.status === "0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since status
is kinda unclear you could make this field success
if you want
actions dropdown:
push
pull