In the world of modern GraphQL development with IBM API Connect for GraphQL (StepZen), integrating with backend services such as REST, GraphQL, or database endpoints is a common task. These integrations often require sensitive credentials like API keys, authorization tokens, or custom headers.
IBM API Connect for GraphQL enables developers to build unified GraphQL APIs quickly by importing existing data sources. However, when using the powerful stepzen import
command, it’s easy to accidentally expose secrets in your GraphQL schema files.
That’s where the --secrets
flag comes in. It ensures sensitive credentials are never written into generated schema files and are instead managed securely in your configuration.
Why You Must Use --secrets
Without --secrets
, any header you pass to an import
command—even a temporary test value—gets hardcoded into your .graphql
file.
🚫 Example of What to Avoid