data-api-builder
data-api-builder copied to clipboard
CosmosDB : Schema Generation
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:
- Customer can pass
schema.gqlfile, as they pass today
- If
schema.gqlfile is not passed, DAB will generate the same schema and load it in during startup itself. a) By default, it will take thetop 1record 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.
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