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

Port of the ConnectionFromArraySlice method #22

Merged
merged 2 commits into from
Feb 13, 2016

Conversation

solher
Copy link
Contributor

@solher solher commented Feb 13, 2016

@sogko
Copy link
Member

sogko commented Feb 13, 2016

@solher Thanks for this PR! Looks good 👍🏻 Appreciate it very much =)
I have a couple of minor comments that I'll add to your commit

@solher
Copy link
Contributor Author

solher commented Feb 13, 2016

No problem !

"strconv"
"strings"
)

const PREFIX = "arrayconnection:"

type ArraySliceMetaInfo struct {
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind helping to add json tags to the struct?

type ArraySliceMetaInfo struct {
    SliceStart  int `json:"sliceStart"`
    ArrayLength int `json:"arrayLength"`
}

sogko added a commit that referenced this pull request Feb 13, 2016
Port of the ConnectionFromArraySlice method
@sogko sogko merged commit 055c2e5 into graphql-go:master Feb 13, 2016
@sogko
Copy link
Member

sogko commented Feb 13, 2016

@solher Thanks again for helping out and contributing to the library, appreciate it very much 👍🏻

@michaelchemani
Copy link

I know that PR has been merged a long time ago but do you think you guys could provide an example of how to use ConnectionFromSliceArray ()? My goal is to also use database offsets and I cannot wrap my head around it. Thank you.

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.

3 participants