data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

CosmosDB : Schema Generation

Open sourabh1007 opened this issue 1 year ago • 0 comments

Why make this change?

Today customer or developer has to feed in schema information in the form of schema.gql file while setting up DAB.

What is this change?

As part of this feature, Customer would have option to let DAB generates the schema on startup.

So it means:

  1. Customer can pass schema.gql file, as they pass today

image

  1. If schema.gql file is not passed, DAB will generate the same schema and load it in during startup itself. a) By default, it will take the top 1 record from the container. b) It would be configurable in config file, where developer can mention the sample size (min: 10, max: 20). c) Developer can write a custom Cosmos DB query which will be used to generate the schema.

image

How was this tested?

  • [ ] Integration Tests
  • [ ] Unit Tests

Sample Request(s)

  • Example REST and/or GraphQL request to demonstrate modifications
  • Example of CLI usage to demonstrate modifications

sourabh1007 avatar May 13 '24 04:05 sourabh1007