Skip to content

Conversation

RogerSelwyn
Copy link
Contributor

Added docs for query builder based on old query helper docs. Two comments to make:

  1. Should this still be called ExperimentalQuery if it is now the recommended way of creating queries?
  2. Previously you could instantiate a query with a simple mailbox.new_query. Now you must:
from O365.utils import ExperimentalQuery
builder = ExperimentalQuery(protocol=account.protocol) # Which assume you have account available when needed
query = builder.xxxxxx

Would it be feasible to add the new builder method to ApiComponent?

@alejcas
Copy link
Member

alejcas commented Jul 7, 2025

There is not an easy way of introducing a breaking change… It should be experimental and advised for some time before changing the whole api. Otherwise I guess we’re making it difficult for users.

I think we can remove the old query and change the new one so it’s the default soon anyway

@RogerSelwyn
Copy link
Contributor Author

I assume I can just reference QueryBuilder instead of ExperimentalQuery which I imagine won’t get removed in the future?

@alejcas
Copy link
Member

alejcas commented Jul 7, 2025

If you look into the code ExperimentalQuery is just an alias:

https://github.com/O365/python-o365/blob/master/O365/utils/__init__.py#L12

I will remove this alias in the future.

Just use QueryBuilder like you said

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