Skip to content

Commit

Permalink
chore(entities): include new query fields for tagsWithMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
zlesnr committed Sep 10, 2020
1 parent 7f3c33e commit 94a0504
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
15 changes: 15 additions & 0 deletions pkg/entities/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,19 @@ const (
reporting
type
`
graphqlEntityStructTagsFields = `
tagsWithMetadata {
key
values {
mutable
value
}
}
tags {
key
values
}
`

graphqlApmApplicationEntityFields = `
... on ApmApplicationEntity {
Expand Down Expand Up @@ -275,13 +288,15 @@ const (

getEntitiesQuery = `query($guids: [String!]!) { actor { entities(guids: $guids) {` +
graphqlEntityStructFields +
graphqlEntityStructTagsFields +
graphqlApmApplicationEntityFields +
graphqlBrowserApplicationEntityFields +
graphqlMobileApplicationEntityFields +
` } } }`

getEntityQuery = `query($guid: String!) { actor { entity(guid: $guid) {` +
graphqlEntityStructFields +
graphqlEntityStructTagsFields +
graphqlApmApplicationEntityFields +
graphqlBrowserApplicationEntityFields +
graphqlMobileApplicationEntityFields +
Expand Down
14 changes: 3 additions & 11 deletions pkg/entities/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,9 @@ func parseTagMutationErrors(errors []tagMutationError) string {
}

var listTagsQuery = `
query($guid:EntityGuid!) {
actor {
entity(guid: $guid) {
tags {
values
key
}
}
}
}
`
query($guid:EntityGuid!) { actor { entity(guid: $guid) {` +
graphqlEntityStructTagsFields +
` } } }`

type listTagsResponse struct {
Actor struct {
Expand Down

0 comments on commit 94a0504

Please sign in to comment.