Fix missing __typename checks and standalone var declarations
Add __typename to GraphQL queries and type guards in risk view, risk list, user view, and user list commands to prevent silent garbage output when a wrong node type ID is passed. Wrap standalone var declarations in var () blocks per style guide. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -26,10 +26,12 @@ import (
|
||||
"go.probo.inc/probo/pkg/cmd/cmdutil"
|
||||
)
|
||||
|
||||
var schemaEndpoints = map[string]string{
|
||||
"console": "/api/console/v1/graphql",
|
||||
"connect": "/api/connect/v1/graphql",
|
||||
}
|
||||
var (
|
||||
schemaEndpoints = map[string]string{
|
||||
"console": "/api/console/v1/graphql",
|
||||
"connect": "/api/connect/v1/graphql",
|
||||
}
|
||||
)
|
||||
|
||||
func NewCmdAPI(f *cmdutil.Factory) *cobra.Command {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user