Skip to main content
Committed ⭐️⭐️
August 15, 2023
Gathering Interest

Feature Request: custom @directives in FDM model definition language

Related products:Data Modeling
  • August 15, 2023
  • 2 replies
  • 28 views

Allow custom directives to be defined in the FDM language. Currently, you cannot create models with new directives.

 

directive @displayName on FIELD_DEFINITION

type Wellbore {

   FacilityName: string @displayName

   ...

 

Use case: I want to create a data API with annotation. GraphQL is descriptive, i.e. I can introspect on the model definition. In the example above, I could use the @displayName annotation to know which attribute my client should use when displaying a data item.

2 replies

Expert ⭐️⭐️⭐️⭐️
August 16, 2023

Hi @tom, I’ve made this into a feature request for you. I’ll ask a product manager to follow up on your idea. Thanks!

Anita Hæhre
Expert ⭐️⭐️⭐️⭐️
Head of Community
August 21, 2023
NewGathering Interest
Anita Hæhre