is there any library developed by cognite which will validate above kind of graphQL syntax also is it possible to check the values provided in graphQL ?
Note that even if this library performs validation against the GraphQL schema there may be other issues with the schema that prevent its deployment, such as limits on schema complexity or conflicts with reserved names (https://docs.cognite.com/cdf/dm/dm_reference/dm_limits_and_restrictions/) or more subtle issues that are discovered by the data modelling service such as indexes being incompatible with the data type they are applied to.
When your are editing your data model in the Fusion UI the editor is validating that your input is valid GraphQL. Only when the definition is valid the data model can be published. When hitting the publish button the schema is applied this step will either go through successfully or be aborted with an error message explaining why the schema could not be applied.
There is no ongoing development of a library that will run validation externally, altough there have discussions around offering a form of dry-run functionality to have a non-comitting validation.
You might already have explored the option of building the schema through the rest api directly, allowing you to handle containers and views more explicitly. Depending on use-case this might be an option as well.
Actually we are not populating the model using cognite UI. We have written python script (using cognite sdk) to publish the model. Hence, we are looking for the library using which we can validate our graphQlL .
@Aditya Kotiyal@Arild Eide Do we have any future plan for external library for validation of graphQL request,
Note that even if this library performs validation against the GraphQL schema there may be other issues with the schema that prevent its deployment, such as limits on schema complexity or conflicts with reserved names (https://docs.cognite.com/cdf/dm/dm_reference/dm_limits_and_restrictions/) or more subtle issues that are discovered by the data modelling service such as indexes being incompatible with the data type they are applied to.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.