@HIDDEN Directive

The @hidden GraphQL directive in Oracle is used to hide a JSON field in the output. Starting in 23.26.1, @hidden can be used both in duality view creation and in GraphQL table function queries.

The directive @hidden takes no arguments. See Generated Fields, Hidden Fields.

Note: A field defined as flex cannot be hidden.

SELECT JSON_SERIALIZE(data PRETTY) AS data FROM GRAPHQL('
    race {
        id: race_id
        name @hidden
    }
');

The preceding example hides the field name from the output and would produce which only contains the race_id:

DATA
--------------------------------------------------------------------------------
{
  "id" : 201,
}

{
  "id" : 202,
}

{
  "id" : 203,
}

{
  "id" : 204,
}
.......................
.......................
24 rows selected.