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

graphql: add destinationDisplayInfo query #3581

Merged
merged 4 commits into from
Jan 9, 2024
Merged

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Jan 8, 2024

Description:
Adds the destinationDisplayInfo query under the dest-types experiemental flag.

Run with make start EXPERIMENTAL=dest-types

Describe any introduced API changes:
Adds Query.destinationDisplayInfo for providing information for displaying a destination in the UI.

Additional Info:

  • Updated slack package to provide Team including IconURL
  • Added helper methods for getting field values from DestintationInput
  • Added destinationDisplayInfo to schema behind experimental flag directive
  • Added TeamID to usergroup metadata
Example Query:
{
  sms: destinationDisplayInfo(input:{
    type: "builtin-twilio-sms",
    values: [{
      fieldID: "phone-number",
      value: "+17635550123"
    }]
  }) {
    iconURL
    iconAltText
    text
    linkURL
  }
  
  email: destinationDisplayInfo(input:{
    type: "builtin-smtp-email",
    values: [{
      fieldID: "email-address",
      value: "[email protected]"
    }]
  }) {
    iconURL
    iconAltText
    text
    linkURL
  }
  
  webhook: destinationDisplayInfo(input:{
    type: "builtin-webhook",
    values: [{
      fieldID: "webhook-url",
      value: "https://google.com"
    }]
  }) {
    iconURL
    iconAltText
    text
    linkURL
  }
  
  
  user: destinationDisplayInfo(input:{
    type: "builtin-user",
    values: [{
      fieldID: "user-id",
      value: "446be959-961e-4815-9a63-62dc045e86e3"
    }]
  }) {
    iconURL
    iconAltText
    text
    linkURL
  }
 
  rotation: destinationDisplayInfo(input:{
    type: "builtin-rotation",
    values: [{
      fieldID: "rotation-id",
      value: "55d54b6c-2b53-43b2-98a4-1fa5442e8495"
    }]
  }) {
    iconURL
    iconAltText
    text
    linkURL
  }
}

@github-actions github-actions bot added the size/m label Jan 8, 2024
@mastercactapus mastercactapus merged commit 643a36e into master Jan 9, 2024
@mastercactapus mastercactapus deleted the dest-display-info branch January 9, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants