Add delete_graphql_api function - #1324
Open
Iurii Iurchenko (iurii-iurchenko-1) wants to merge 1 commit into
Open
Add delete_graphql_api function#1324Iurii Iurchenko (iurii-iurchenko-1) wants to merge 1 commit into
Iurii Iurchenko (iurii-iurchenko-1) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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_apiimplementation ingraphql/_items.pyusing the shareddelete_itemhelper fortype="GraphQLApi". - Exported
delete_graphql_apifromsempy_labs.graphqland surfaced a matching top-level wrapper in_graphQL.py. - Exported
delete_graphql_apiat 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.
Contributor
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a dedicated delete function for the GraphQLApi item type, wrapping Items - Delete GraphQLApi.
The
graphqlsubmodule currently covers onlylistandcreateout of the 7 GraphQLApi item APIs. This addsdelete, following the existingdelete_warehouse_snapshot/delete_variable_librarypattern via the shareddelete_itemhelper.Changes
graphql/_items.py— addeddelete_graphql_apigraphql/__init__.py— exported it_graphQL.py— top-level wrapper, matching the two existing GraphQL functions__init__.py— exported at the package levelTesting
Built the wheel and ran it in a Fabric notebook against a live workspace:
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.