What's the best way in GraphQL to get the entity URL in the output

Hi guys,

What’s the best way in GraphQL to get the entity URL in the output?

:arrow_up: so in this output :slight_smile:


Do you mean a URL field in the db, or do you mean the URL which takes you to the entity?

The former should be available as a field to query. For the latter, the URL is not a property of the entity, so GraphQL will not be able to generate it.
However, the entity URL follows a standard form:
so you can use GraphQL to get the Public Id and formulate the URL using knowledge of the names of the workspace/space/db.

Yes, entity URL.

I was hoping to avoid this because of the extra calls needed.

As a workaround: is there a way to easily put the entity URL in a database field in Fibery? I know it can be done via script but since this part involves a lot of DBs I’m trying to avoid that :sweat_smile:

Background info: we’re creating a daily email with all entities of databases with deadlines due today + tomorrow in the workspace.

Maybe you see other workarounds :smile:

(we don’t want to send that email via Fibery because we then need to set-up email for each and every client; we rather send the emails via our own server)

It’s possible to do it with formulas or automations, but there is no way to set it up for all databases at once.

I’m not sure how you’re currently using (or plan to use) graphql, so I don’t know why you think extra calls would be needed. You could just include the public id as a required element to be returned as part of the existing call, and then use a quick transformation line to convert it into the full url.

True! I thought extra calls were needed because we don’t have workspace name + db name in GraphQL output. But we have them before we make the call so we can combine them :slight_smile: Thanks!