Skip to main content
Solved

How Are GraphQL Mutations Defined in the CDF Template Syntax


Ben Brandt
MVP

I am seeing how to create Templates used to query data, but I have not yet found information related to defining GraphQL mutations.  Do you know where I can find this information?  Thanks!

 

Here are some places I’ve been looking.

Docs:

Templates | Cognite Documentation
About template management | Cognite Documentation
Search results for "templates" | Cognite Documentation

The tests in the Python SDK:

https://github.com/cognitedata/cognite-sdk-python/blob/master/tests/tests_integration/test_api/test_templates.py

 

There is some info related to GraphQL mutations and Cognite here, but this doesn’t seem related to Cognite’s Template functionality:

https://itg.cognite.ai/docs/tutorials/data-ingestion/ingesting-data
https://github.com/cognitedata/sample-cdf-graphql-angular-app/blob/9641e4967e0a288241ef68b3e94786b56de456c2/src/app/itg-api.service.ts#L125

Best answer by David Liu

Hi Ben!

This is great feedback for us! We have not planned to add any ability to mutate data via the GraphQL interface and was looking for requests regarding this feature. We have SDKs that makes it easy to ingest and mutate data in Templates and we are just finishing up the final documentation this week, and I will post it in this thread and also in the Flexible Data Modeling Cognite Hub group.

As for the last link, that is towards a prototype called ITG which provided us learnings around mutations that we hope to capture (along with feedback like this around Templates) as we are building more data modeling feature this year. 

I will share an early preview of the “documentation for modifying data via SDK” with you now, and share it publicly here once it is live later this week.

View original
Did this topic help you find an answer to your question?

2 replies

David Liu
Seasoned Practitioner
  • Seasoned Practitioner
  • 15 replies
  • Answer
  • March 7, 2022

Hi Ben!

This is great feedback for us! We have not planned to add any ability to mutate data via the GraphQL interface and was looking for requests regarding this feature. We have SDKs that makes it easy to ingest and mutate data in Templates and we are just finishing up the final documentation this week, and I will post it in this thread and also in the Flexible Data Modeling Cognite Hub group.

As for the last link, that is towards a prototype called ITG which provided us learnings around mutations that we hope to capture (along with feedback like this around Templates) as we are building more data modeling feature this year. 

I will share an early preview of the “documentation for modifying data via SDK” with you now, and share it publicly here once it is live later this week.


@David Liu  - Do we have any docuementation regarding adding mutations to a data model on CDF? Thanks ! 


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings