Skip to content

Add delete_graphql_api function - #1324

Open
Iurii Iurchenko (iurii-iurchenko-1) wants to merge 1 commit into
microsoft:mainfrom
iurii-iurchenko-1:iurii-iurchenko-1/delete-graphql-api
Open

Add delete_graphql_api function#1324
Iurii Iurchenko (iurii-iurchenko-1) wants to merge 1 commit into
microsoft:mainfrom
iurii-iurchenko-1:iurii-iurchenko-1/delete-graphql-api

Conversation

@iurii-iurchenko-1

Copy link
Copy Markdown
Contributor

Adds a dedicated delete function for the GraphQLApi item type, wrapping Items - Delete GraphQLApi.

The graphql submodule currently covers only list and create out of the 7 GraphQLApi item APIs. This adds delete, following the existing delete_warehouse_snapshot / delete_variable_library pattern via the shared delete_item helper.

Changes

  • graphql/_items.py — added delete_graphql_api
  • graphql/__init__.py — exported it
  • _graphQL.py — top-level wrapper, matching the two existing GraphQL functions
  • __init__.py — exported at the package level

Testing
Built the wheel and ran it in a Fabric notebook against a live workspace:

labs.create_graphql_api(name="test_delete_me", workspace=ws)
display(labs.list_graphql_apis(workspace=ws))

graphql.delete_graphql_api(graphql_api="test_delete_me", workspace=ws)
display(labs.list_graphql_apis(workspace=ws))

The API was created, appeared in the list, was deleted successfully, and no longer appeared in the subsequent list.

Formatted with black==25.1.0.

Happy to follow up with get, update, and the get/update definition APIs for GraphQLApi if that would be useful.

Copilot AI lite review requested due to automatic review settings August 18, 2026 22:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a delete_graphql_api helper to the GraphQL API surface area in sempy_labs, exposing deletion at the submodule (sempy_labs.graphql) and top-level package (sempy_labs) layers by reusing the shared delete_item helper.

Changes:

  • Added delete_graphql_api implementation in graphql/_items.py using the shared delete_item helper for type="GraphQLApi".
  • Exported delete_graphql_api from sempy_labs.graphql and surfaced a matching top-level wrapper in _graphQL.py.
  • Exported delete_graphql_api at the package root (src/sempy_labs/__init__.py) for parity with existing GraphQL helpers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/sempy_labs/graphql/_items.py Adds delete_graphql_api that delegates deletion to the shared delete_item helper.
src/sempy_labs/graphql/init.py Exposes delete_graphql_api in the sempy_labs.graphql public API.
src/sempy_labs/_graphQL.py Adds a top-level delete_graphql_api wrapper consistent with existing GraphQL wrappers.
src/sempy_labs/init.py Re-exports delete_graphql_api at the package level.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@iurii-iurchenko-1

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants