Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeltaRequestBuilderGetQueryParameters for messages missing option for changeType #364

Closed
jussihi opened this issue Sep 22, 2023 · 15 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Needs: Attention 👋 WIP

Comments

@jussihi
Copy link

jussihi commented Sep 22, 2023

https://learn.microsoft.com/en-us/graph/delta-query-messages#use-query-parameters-in-a-delta-query-for-messages

quoted:
Additionally, to return only certain type of changes (created, updated or deleted) in the delta query's response, you can optionally filter the desired type of change using a custom query option changeType. Possible values are created, updated or deleted.

Regarding my other problems, there doesn't seem to be a way to set the query parameter for delta tracking's "changeType" field. None of this package's DeltaRequestBuilderGetQueryParameters has this field. Or should I create my own class inheriting DeltaRequestBuilderGetQueryParameters and add it there manually?

@jussihi
Copy link
Author

jussihi commented Nov 15, 2023

This is still not implemented.

query_params = DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters(
    changeType = "created"
)

fails to TypeError: DeltaRequestBuilder.DeltaRequestBuilderGetQueryParameters.__init__() got an unexpected keyword argument 'changeType'

it is however clearly documented online: https://learn.microsoft.com/en-us/graph/api/message-delta?view=graph-rest-1.0&tabs=http#query-parameters

@jussihi
Copy link
Author

jussihi commented Nov 15, 2023

@samwelkanda , @baywet could you please check this? Am I understanding something wrong? I thought that this would get fixed before release 1.0.0, but for some reason it's still not there. :)

@baywet
Copy link
Member

baywet commented Nov 15, 2023

@jussihi thanks for the nudge here. This is caused by this metadata issue.
microsoftgraph/msgraph-metadata#480

Let me see if I can get it prioritized

@baywet baywet added bug Something isn't working dependencies Pull requests that update a dependency file labels Nov 15, 2023
@jussihi
Copy link
Author

jussihi commented Nov 15, 2023

Ah, I see it is some dependency and not tied to the preview-or-not -status of this python library! Thanks for the information. Let's see when we get the feature added!

@baywet
Copy link
Member

baywet commented Nov 15, 2023

Update: the fix to metadata was just merged in today, which means the query parameter should show up in the next generation next week.
microsoftgraph/msgraph-metadata#500

@jussihi
Copy link
Author

jussihi commented Nov 15, 2023

Thanks for the heads-up and quick work on this @baywet !

@jussihi
Copy link
Author

jussihi commented Dec 13, 2023

@baywet , which pip module should I upgrade to see this change? I'm still not able to get it working... 😁

@baywet
Copy link
Member

baywet commented Dec 13, 2023

This is because we haven't released a new version since my last message. Please bear with us while we sort through some organizational/staffing aspects in the background. If this is a pressing matter, please open a support ticket and reference this issue.

@jussihi
Copy link
Author

jussihi commented Dec 13, 2023

Ok @baywet , thanks for the info. No no there is no hurry, I know it might be a challenging time what we are living in :) I was just wondering if I was doing something wrong here at my end. Thanks for the support again, it is very much appreciated!

@jussihi
Copy link
Author

jussihi commented Jan 15, 2024

Also https://learn.microsoft.com/en-us/graph/api/calendar-list-calendarview?view=graph-rest-1.0&tabs=python#request (CalendarViewRequestBuilderGetQueryParameters) are missing, I get

CalendarViewRequestBuilder.CalendarViewRequestBuilderGetQueryParameters.__init__() got an unexpected keyword argument 'start_date_time'

@baywet , Should I open another issue or is it enough to report this here?

@jussihi
Copy link
Author

jussihi commented Jan 15, 2024

Also, is there a way to get around this SDK limitation for time being, i.e. can I somehow manually insert these parameters to the request?

I would like to get the calendar view one working, since I need it.

@baywet
Copy link
Member

baywet commented Jan 15, 2024

@jussihi This is a different problem (different endpoint/operation) maybe opening a separate issue would have been better here.
What version of the SDK are you using? The property/query parameter is present.
https://github.com/microsoftgraph/msgraph-sdk-python/blame/c1cf802f3ca7f6dc4c22cc9eea765e72c7f9721a/msgraph/generated/users/item/calendar/calendar_view/calendar_view_request_builder.py#L163

As for the original issue of the missing change type, it is present in the latest version of the SDK

@baywet
Copy link
Member

baywet commented Jan 15, 2024

Allow to correct the previous statement, it is merged in the main branch, but it seems the package hasn't been published since the original release. https://pypi.org/project/msgraph-sdk/
@samwelkanda is there anything holding weekly releases at this point?

@jussihi
Copy link
Author

jussihi commented Jan 15, 2024

@baywet thank you again for the quick response. Once there is >1.0.0 version available, I will update my python package and report back about these features! 👍

@jussihi
Copy link
Author

jussihi commented Feb 13, 2024

This works now! Thank you for support, this issue can be closed :)

@baywet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Needs: Attention 👋 WIP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants