Azure / data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
https://aka.ms/dab/docs
MIT License
787 stars 142 forks source link

Add MaxResponseSizeMB to runtime config. #2242

Closed rohkhann closed 3 weeks ago

rohkhann commented 4 weeks ago

Why make this change?

This change adds in a new property to the host parameter of runtime config called MaxResponseSizeMB. This property will allow users to configure the amount of data that their host platform's memory can handle when streaming data from the underlying datasources.

What is this change?

This change adds the maxresponseSizeMB property to the runtime config. In addition, it adds an accessor for that property which would be needed to implement the actual logic of streaming.

How was this tested?

Unit tests are added.

rohkhann commented 4 weeks ago

/azp run

rohkhann commented 3 weeks ago

When i have a dab-config.json where i set "max-response-size-mb": null and then run DAB's CLI -> dab add Book --config "path/to/config.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books"

The field "max-response-size-mb" disappears from my config. The use case is this: I am explicitly setting the property and value in my config. I am saying: "i want no limit to max response size, do NOT give me DAB's default value as that could change in the future. My config is explicitly telling dab what i want and the CLI shouldn't remove my explicitly defined field."

Added similar flow to pagination options. Added all the things discussed in design doc.

rohkhann commented 3 weeks ago

/azp run

rohkhann commented 3 weeks ago

/azp run

rohkhann commented 3 weeks ago

/azp run