![]() |
VOOZH | about |
The CData Cmdlets Module for GraphQL is a standard PowerShell module offering straightforward integration with GraphQL. Below, you will find examples of using our GraphQL Cmdlets with native PowerShell cmdlets.
You must specify the URL of the GraphQL service. The driver supports two types of authentication:
$conn = Connect-GraphQL -AuthScheme "$AuthScheme" -User "$User" -Password "$Password" -URL "$URL" -InitiateOAuth "$InitiateOAuth"
Follow the steps below to retrieve data from the Users table and pipe the result into to a CSV file:
Select-GraphQL -Connection $conn -Table Users | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myUsersData.csv -NoTypeInformation
You will notice that we piped the results from Select-GraphQL into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.
The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.Download a free trial of the GraphQL Cmdlets to get started:
Download NowLearn more:
👁 GraphQL IconAn easy-to-use set of PowerShell Cmdlets offering real-time access to GraphQL. The Cmdlets allow users to easily access live data - just like working with SQL server.