ConvertTo-BirdWeatherGraphQLSelection

SYNOPSIS

Converts a list of property paths into a GraphQL selection set

SYNTAX

__AllParameterSets

ConvertTo-BirdWeatherGraphQLSelection [[-Property] <string[]>] [-Default] <string[]>

ALIASES

This cmdlet has the following aliases,

  • ConvertTo-BWGSelection

DESCRIPTION

The ConvertTo-BirdWeatherGraphQLSelection cmdlet converts a list of property paths into the selection set that is used in a GraphQL query

Nested properties are defined with a dot, such as species.commonName The first letter of every property name is converted to lower case so that the PascalCase names, such as CommonName, can be used

The names are validated so that only valid GraphQL names are used in the query This is an internal helper function that is used by all public functions

EXAMPLES

EXAMPLE 1

ConvertTo-BirdWeatherGraphQLSelection -Property 'id', 'Species.CommonName', 'species.scientificName'

Returns ‘id species { commonName scientificName }’

EXAMPLE 2

ConvertTo-BirdWeatherGraphQLSelection -Default 'id', 'name'

Returns ‘id name’

PARAMETERS

-Default

The property paths that are used when the Property parameter is not defined

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Property

The property paths to select Multiple values can be separated with a comma

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

NOTES

N/A