Skip to content

Commit

Permalink
feat: Token Exchange Queries (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino authored Aug 11, 2023
1 parent 6438171 commit b7792e3
Show file tree
Hide file tree
Showing 5 changed files with 242 additions and 36 deletions.
105 changes: 102 additions & 3 deletions client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions graph/models.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,12 @@ fragment ChatMessageFragment on ChatMessage {
role
content
name
}

fragment OidcTrustRelationshipFragment on OidcTrustRelationship {
id
issuer
trust
scopes
insertedAt
}
21 changes: 19 additions & 2 deletions graph/users.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
query Me{
me { id email demoing }
me {
id
email
demoing
trustRelationships { ...OidcTrustRelationshipFragment }
}
}

query GetLoginMethod($email: String!) {
Expand Down Expand Up @@ -81,4 +86,16 @@ query GetHelp($prompt: String!) {

query Chat($history: [ChatMessageAttributes]) {
chat(history: $history) { ...ChatMessageFragment }
}
}

mutation CreateTrust($attributes: TrustRelationshipAttributes!) {
createTrustRelationship(attributes: $attributes) { ...OidcTrustRelationshipFragment }
}

mutation DeleteTrust($id: ID!) {
deleteTrustRelationship(id: $id) { id }
}

query OidcToken($provider: ExternalOidcProvider!, $token: String!, $email: String!) {
oidcToken(provider: $provider, idToken: $token, email: $email)
}
77 changes: 66 additions & 11 deletions models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b7792e3

Please sign in to comment.