C1000-138 practice question 14 of 15

The GraphQL developer incorporated a field that should not be available for introspection or validation by the client. How would the API developer obfuscate the field so clients will not view them?

Full set: 60 questions
Answer options
A: Click the gear icon and choose Hide on the Show/Hide setting.
B: Apply the @hide directive to the GraphQL schema. Correct answer
C: Add the Redaction policy to the GraphQL Assemble.
D: Choose the field in the schedule and click the delete icon.
Correct Answer:
B. Apply the @hide directive to the GraphQL schema.
Explanation

In IBM API Connect's GraphQL implementation, the @hide directive is used to prevent specific fields, arguments, or entire types from being included in the schema exposed to clients. When applied in the GraphQL schema definition, any element marked with @hide is removed from the results of an introspection query and will fail validation if a client attempts to use it. This effectively obfuscates the field from the client's view while it can still exist in the backend implementation.

Why Incorrect

A. UI settings like "Show/Hide" in the API Manager typically control visibility within the management interface, not the public-facing introspectable schema.
C. A Redaction policy is used to mask or remove sensitive data from the response payload (the data itself), not to alter the API's schema definition.
D. Deleting the field from the schema removes it completely from the API, which is different from hiding it from client introspection while retaining it internally.

References

1. IBM API Connect Documentation, "Using the @hide directive". This page provides a direct explanation: "You can use the @hide directive to reduce the complexity of your external schema by removing specific fields and types that are not intended for external consumption... Elements that are decorated with @hide are removed from the schema during introspection." (IBM Knowledge Center for API Connect v10.0.x, Creating GraphQL APIs section).

2. IBM API Connect Documentation, "GraphQL proxy API tutorial". Tutorials on creating GraphQL APIs often include advanced steps like schema modification, where directives such as @hide are introduced as a method for controlling schema visibility. (IBM Knowledge Center for API Connect v10.0.x).

Scroll to Top