We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Package v2/astprinter missing feature: it does not print which interfaces given transitive interface implements
Given the following source code
package main import ( "fmt" "github.com/wundergraph/graphql-go-tools/v2/pkg/ast" "github.com/wundergraph/graphql-go-tools/v2/pkg/astparser" "github.com/wundergraph/graphql-go-tools/v2/pkg/astprinter" ) func main() { d, _ := astparser.ParseGraphqlDocumentString(` interface I1 { id: ID } interface I2 implements I1 { id: ID } `) out, _ := astprinter.PrintStringIndent(&d, " ") fmt.Println(out) // Demonstrate that document's internal structure is correct for _, n := range d.RootNodes { if n.Kind == ast.NodeKindInterfaceTypeDefinition { for _, iRef := range d.InterfaceTypeDefinitions[n.Ref].ImplementsInterfaces.Refs { fmt.Printf("# Interface %v implements %v\n", d.NodeNameBytes(n), d.ResolveTypeNameBytes(iRef)) } } } }
I expected to see the following result (interface I2 definition implements I1):
interface I1 { id: ID } interface I2 implements I1 { id: ID } # Interface I2 implements I1
What i've got (interface I2 definition DOES NOT implements I1):
interface I1 { id: ID } interface I2 { id: ID } # Interface I2 implements I1
The text was updated successfully, but these errors were encountered:
fix: implement transitive interface output
4036f86
Just copied relevant part from EnterObjectTypeDefinition() Also add tests Fixes wundergraph#1018
fix(astprinter): implement transitive interface output
379c5d4
9f5e4a4
9c63f7c
Successfully merging a pull request may close this issue.
Description
Package v2/astprinter missing feature: it does not print which interfaces given transitive interface implements
Sample source code
Given the following source code
Expected result
I expected to see the following result (interface I2 definition implements I1):
Actual result
What i've got (interface I2 definition DOES NOT implements I1):
The text was updated successfully, but these errors were encountered: