Get Graph Query Language with PowerShell.
GQL is a small PowerShell module for GraphQL.
It is designed to provide a simple GraphQL client in PowerShell.
We can use this as a direct client to GraphQL, without having to involve any other layer.
You can use the GQL module within a container:
docker pull ghcr.io/powershellweb/gql
docker run -it ghcr.io/powershellweb/gql
Install-Module GQL -Scope CurrentUser -Force
Import-Module GQL -Force -PassThru
To connect to a GQL and get results, use Get-GQL, or, simply GQL
.
(like all functions in PowerShell, it is case-insensitive)
# Getting git sponsorship information from GitHub GraphQL.
# **To use this example, we'll need to provide `$MyPat` with a Personal Access Token.**
Get-GQL -Query ./Examples/GitSponsors.gql -PersonalAccessToken $myPat
# We can decorate graph object results to customize them.