Overview
List all credentials, using an alias for a field in the query, and iterate over the result to print each credential’s name and type.Steps
1
Import the client
Import the
Client from validio_sdk.client.2
Write the request
Write a
credentialsList query. The query uses an alias to return the name of the type as credentialType instead of __typename. The alias isn’t required; it’s there to show how aliasing works.3
Execute the request
Send the request. The response is under the same key as the name of the operation,
credentialsList. The client is asynchronous, so you have to await the request.4
Iterate over the result
Loop over all credentials and print the name of each credential and its type.
Full code sample
Python