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 index generation #302

Closed
wants to merge 2 commits into from
Closed

fix index generation #302

wants to merge 2 commits into from

Conversation

vvakame
Copy link
Collaborator

@vvakame vvakame commented Aug 21, 2018

@vvakame vvakame requested a review from vektah August 21, 2018 08:40
@vektah
Copy link
Collaborator

vektah commented Aug 22, 2018

The func should probably capture this as an argument:

arr1 = append(arr1, func(idx1 int) graphql.Marshaler {
	// ...
	return arr2
}(idx1))

and a test would be nice, this is pretty easy to miss.

@vvakame
Copy link
Collaborator Author

vvakame commented Aug 22, 2018

Where do you write the test now?

@vektah
Copy link
Collaborator

vektah commented Aug 22, 2018

If you can do it without changing the schema, use one of the examples.

Otherwise, dump it in https://github.com/99designs/gqlgen/blob/master/codegen/testserver/generated_test.go

@vvakame
Copy link
Collaborator Author

vvakame commented Aug 22, 2018

this function is an immediate evaluate, it is not a problem even with the original code .... I have just noticed.

@vvakame vvakame closed this Aug 22, 2018
@vvakame vvakame deleted the fix-index branch August 22, 2018 12:06
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.

2 participants