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

fix: documentation is not being generated on GQL #3730

Merged

Conversation

anwarulislam
Copy link
Member

Closes HFE-380

Description

Updated the resolveRootType function to correctly handle GraphQL types that do not have an ofType property. The function now uses a while loop to traverse the ofType chain until it reaches a type that does not contain any other types (i.e., its ofType property is null). This ensures that the function always returns the correct root type for any given GraphQL type.

  • Not Completed
  • Completed

@anwarulislam anwarulislam changed the base branch from main to release/2023.12.2 January 7, 2024 20:46
@anwarulislam anwarulislam marked this pull request as ready for review January 7, 2024 20:47
@Timeraa
Copy link
Contributor

Timeraa commented Jan 8, 2024

Encountered this issue as well when I was working on #3723, glad I wasn't the only one

Copy link
Contributor

@amk-dev amk-dev left a comment

Choose a reason for hiding this comment

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

there is a method from the graphql package getNamedType that does the same thing as resolveRootType. can we use that instead of resolveRootType

https://graphql.org/graphql-js/type/#getnamedtype

@liyasthomas
Copy link
Member

Updated to getNamedType instead of resolveRootType.

@AndrewBastin AndrewBastin changed the base branch from release/2023.12.2 to release/2023.12.3 January 23, 2024 16:26
@AndrewBastin AndrewBastin merged commit c0dbcc9 into hoppscotch:release/2023.12.3 Jan 23, 2024
1 check passed
JoelJacobStephen pushed a commit to JoelJacobStephen/hoppscotch that referenced this pull request Jan 30, 2024
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.

None yet

6 participants