Skip to content

Commit

Permalink
Update GraphQL queries to reflect new schema changes
Browse files Browse the repository at this point in the history
Adjusted `AccountInfo`, `login`, and `create` queries to align with the new schema, including changes to account controllers and finalizing login mutations. These updates ensure proper querying and mutation according to the updated backend structure.
  • Loading branch information
steebchen committed Oct 1, 2024
1 parent a57e505 commit 729060f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/keychain/src/pages/accountInfo.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
query AccountInfo($address: String!) {
accounts(where: { contractAddress: $address }, first: 1) {
accounts(where: { hasControllersWith: { address: $address } }, first: 1) {
edges {
node {
id
Expand Down
15 changes: 12 additions & 3 deletions packages/keychain/src/pages/create.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ mutation BeginRegistration($id: String!) {
mutation FinalizeRegistration($credentials: String!) {
finalizeRegistration(credentials: $credentials) {
id
contractAddress
controllers {
address
signers {
type
}
}
credentials {
webauthn {
id
Expand All @@ -18,13 +23,17 @@ mutation FinalizeRegistration($credentials: String!) {
query Account($id: ID!) {
account(id: $id) {
id
type
credentials {
webauthn {
id
publicKey
}
}
contractAddress
controllers {
address
signers {
type
}
}
}
}
4 changes: 0 additions & 4 deletions packages/keychain/src/pages/login.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ mutation BeginLogin($id: String!) {
mutation FinalizeLogin($credentials: String!) {
finalizeLogin(credentials: $credentials)
}

# mutation DiscordRevoke($token: String!) {
# discordRevoke(token: $token)
# }

0 comments on commit 729060f

Please sign in to comment.