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 new cli command to update runtime with graphql depth limit #2250

Closed abhishekkumams closed 2 weeks ago

abhishekkumams commented 3 weeks ago

Why make this change?

What is this change?

NOTE:

if limit is not already specified, it will add this property to config, else update it.

How was this tested?

Sample Request(s)

initial config

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true
}

command: dab configure --runtime.graphql.depth-limit 20

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true,
    "depth-limit": 20
}

command: dab configure --runtime.graphql.depth-limit 8

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true,
    "depth-limit": 8
}

command: dab configure --runtime.graphql.depth-limit -1

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true,
    "depth-limit": -1
}

Special Case: if value of "depth-limit" is null in the config. it will stay as is, if not updated.

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true,
    "depth-limit": null
}

command: dab configure

No change:

"graphql": {
    "path": "/graphql",
    "enabled": true,
    "allow-introspection": true,
    "depth-limit": null
}
abhishekkumams commented 2 weeks ago

/azp run

abhishekkumams commented 2 weeks ago

/azp run

abhishekkumams commented 2 weeks ago

/azp run