Log in with an API token
Authorization: Bearer <token>.
Log in with a password
create_apitoken=True only when the script intentionally needs to mint and retain a long-lived token; by default that helper requests broad access, so creating a named token with explicit scopes is safer for production automation.
Run a custom GraphQL query
execute_custom_query when you need a field that is not yet wrapped.