-
Notifications
You must be signed in to change notification settings - Fork 39
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
Query parameter does not work properly when retrieving users #31
Comments
hi @m-moris Can you confirm you're on latest for all the dependencies by running Can you also test whether it's specific to that parameter (select) by trying to use a filter query parameter for the same request please and see if it works? Thanks! |
Hi The results of "go get" will have to wait a bit. I tried followning sample using f := "endsWith(mail,'@hotmail.com')"
options := &u.UsersRequestBuilderGetOptions{
Q: &u.UsersRequestBuilderGetQueryParameters{
Filter: &f,
},
}
result, err := client.Users().Get(options)
if err != nil {
fmt.Printf("Error get user : %v\n", err)
return
} I debugged it, following line converts the data from "requestInfo" to "nethttp.Request". However, the "getRequestFromRequestInformation" function does not seem to be doing any filtering. https://github.com/microsoft/kiota/blob/main/http/go/nethttp/nethttp_request_adapter.go#L95 The following is the value of the request after conversion. Normally, the filter value would be set to "rawQuery".
Thanks |
Hi The results of "go get -u" are attached. This will take a long time, so this is the result in the middle of execution.
|
Thanks for the additional information here. |
Update: I've put together a PR in the generator, once it gets merged, I'll be able to put a PR together here and in the beta SDK which should address the issue. |
update, unfortunately the previous PR introduced a regression, I've put another PR to fix that regression here |
Hi @m-moris |
Thank you for your support.
f := "startsWith(mail,'bob')"
options := &u.UsersRequestBuilderGetOptions{
Q: &u.UsersRequestBuilderGetQueryParameters{
Filter: &f,
Select: []string{"createdDateTime"},
},
}
resultx, err := client.Users().Get(options)
if err != nil {
fmt.Printf("Error geuser : %v\n", err)
return
} I have debugged deeply, and there seems to be a bug in the following points.
https://github.com/microsoft/kiota/blob/main/abstractions/go/request_information.go#L46 Thanks. |
Hi @m-moris I've put together microsoft/kiota#917 which addresses that aspect, once it gets merged running |
The pull request was merged. |
Hi @baywet Thank you for your support. Select queries are now working! |
Thanks for confirming, closing. |
Hi
I have created a sample program to retrieve a user, but the query parameter does not seem to be working correctly.
When I debug it, it seems that the query parameter is not set correctly, is it still a limitation?
The following sample query for the
CreatedDateTime
property to be included in the response, but returns NULL.Thanks.
The text was updated successfully, but these errors were encountered: