Skip to content

Conversation

@sezal98
Copy link
Contributor

@sezal98 sezal98 commented Apr 18, 2025

Why make this change?

Resolved #2645

What is this change?

We need to take the plural value for the creating the http payload for the graphql request. Further we need to camel case this value instead of using the objects value which I was currently using

How was this tested?

Local Testing

  1. Type.Plural not provided and entity name is not the same as table name
  2. Type.Plural not provided and entity name is caps
  3. Type.Plural not provided and entity name is all small
  4. source.objects is provided as dbo.books
  5. Type.Plural provided but in all small case
  6. Type.Plural provided in all caps

Sample Request(s)

image image

@sezal98 sezal98 marked this pull request as ready for review April 18, 2025 07:31
Copilot AI review requested due to automatic review settings April 18, 2025 07:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a GraphQL health request bug by ensuring the HTTP payload uses the correct pluralized and camel-cased entity name.

  • Updated the query formatting in Utilities.cs to remove the lowercasing of the entity name.
  • Modified HttpUtilities.cs to use the GraphQL.Plural value (after converting it to camel case) via a new LowerFirstLetter helper.
  • Adjusted HealthCheckHelper.cs for consistent REST API path handling.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Service/HealthCheck/Utilities.cs Updated GraphQL query formation by removing the lowercasing of entityName.
src/Service/HealthCheck/HttpUtilities.cs Switched to using GraphQL.Plural (converted to camel case) and added the LowerFirstLetter helper.
src/Service/HealthCheck/HealthCheckHelper.cs Updated REST API health check to trim the leading '/' from entity paths.

@sezal98
Copy link
Contributor Author

sezal98 commented Apr 18, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

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

LGTM!

@sezal98 sezal98 enabled auto-merge (squash) April 22, 2025 16:07
Copy link
Contributor

@RubenCerna2079 RubenCerna2079 left a comment

Choose a reason for hiding this comment

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

LGTM :)

@sezal98 sezal98 merged commit 365fbda into main Apr 22, 2025
11 checks passed
@sezal98 sezal98 deleted the dev/sezalchug/healthGraphQLBug branch April 22, 2025 16:36
@sezal98 sezal98 self-assigned this Apr 23, 2025
@Aniruddh25 Aniruddh25 added this to the 1.5 milestone May 11, 2025
RubenCerna2079 pushed a commit that referenced this pull request May 16, 2025
## Why make this change?
Resolved #2645

## What is this change?
We need to take the plural value for the creating the http payload for
the graphql request. Further we need to camel case this value instead of
using the objects value which I was currently using

## How was this tested?
Local Testing
1. Type.Plural not provided and entity name is not the same as table
name
2. Type.Plural not provided and entity name is caps
3. Type.Plural not provided and entity name is all small
4. source.objects is provided as `dbo.books`
5. Type.Plural provided but in all small case
6. Type.Plural provided in all caps


## Sample Request(s)
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/26c35c70-34a0-40d9-b344-90d7c31d117f"
/>
<img width="234" alt="image"
src="https://github.com/user-attachments/assets/b3385e59-c9ee-4ad7-8fdb-2555bfaf16ed"
/>

---------

Co-authored-by: sezalchug <[email protected]>
RubenCerna2079 pushed a commit that referenced this pull request May 29, 2025
## Why make this change?
Resolved #2645

## What is this change?
We need to take the plural value for the creating the http payload for
the graphql request. Further we need to camel case this value instead of
using the objects value which I was currently using

## How was this tested?
Local Testing
1. Type.Plural not provided and entity name is not the same as table
name
2. Type.Plural not provided and entity name is caps
3. Type.Plural not provided and entity name is all small
4. source.objects is provided as `dbo.books`
5. Type.Plural provided but in all small case
6. Type.Plural provided in all caps

## Sample Request(s)
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/26c35c70-34a0-40d9-b344-90d7c31d117f"
/>
<img width="234" alt="image"
src="https://github.com/user-attachments/assets/b3385e59-c9ee-4ad7-8fdb-2555bfaf16ed"
/>

---------

Co-authored-by: sezalchug <[email protected]>
aaronburtle added a commit that referenced this pull request May 29, 2025
## Why make this change?

This change is made in order to add all of the commits for milestone 1.5
into its respective branch.

## What is this change?

This change cherry-picks all of the commits that were added after the
first release candidate.
Cherry-picked commits:
 - #2648 
#2657
#2617 
#2659 
#2655 
#2633 
#2667 
#2673 
#2650 
#2695 
#2702 
#2688

## How was this tested?

- [ ] Integration Tests
- [ ] Unit Tests

## Sample Request(s)

---------

Co-authored-by: Sezal Chug <[email protected]>
Co-authored-by: sezalchug <[email protected]>
Co-authored-by: Tommaso Stocchi <[email protected]>
Co-authored-by: Aaron Powell <[email protected]>
Co-authored-by: aaronburtle <[email protected]>
Co-authored-by: Aniruddh Munde <[email protected]>
Co-authored-by: Jerry Nixon <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Michael Staib <[email protected]>
Co-authored-by: souvikghosh04 <[email protected]>
Co-authored-by: Souvik Ghosh <[email protected]>
RubenCerna2079 pushed a commit that referenced this pull request May 29, 2025
Resolved #2645

We need to take the plural value for the creating the http payload for
the graphql request. Further we need to camel case this value instead of
using the objects value which I was currently using

Local Testing
1. Type.Plural not provided and entity name is not the same as table
name
2. Type.Plural not provided and entity name is caps
3. Type.Plural not provided and entity name is all small
4. source.objects is provided as `dbo.books`
5. Type.Plural provided but in all small case
6. Type.Plural provided in all caps

<img width="310" alt="image"
src="https://github.com/user-attachments/assets/26c35c70-34a0-40d9-b344-90d7c31d117f"
/>
<img width="234" alt="image"
src="https://github.com/user-attachments/assets/b3385e59-c9ee-4ad7-8fdb-2555bfaf16ed"
/>

---------

Co-authored-by: sezalchug <[email protected]>
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.

[Bug]: Health / Expected a Name-token, but found a Dot-token.

5 participants