Skip to content

LHK-590 Added modern GraphQL Relay sample project with React - #420

Merged
xperiandri merged 16 commits into
fsprojects:devfrom
Lula-Archive:LHK-590-implement-graphql-relay-cursor
Feb 4, 2023
Merged

LHK-590 Added modern GraphQL Relay sample project with React#420
xperiandri merged 16 commits into
fsprojects:devfrom
Lula-Archive:LHK-590-implement-graphql-relay-cursor

Conversation

@okhorsunenko-lula

Copy link
Copy Markdown
Contributor

No description provided.

@xperiandri

Copy link
Copy Markdown
Collaborator

@andriilula please, review too

@xperiandri

Copy link
Copy Markdown
Collaborator

@okhorsunenko-lula, @andriilula do we need relay-starter-kit having relay-modern-starter-kit?

@xperiandri

xperiandri commented Jan 18, 2023

Copy link
Copy Markdown
Collaborator

@okhorsunenko-lula let's format fields input parameter in the same way across the solution FSharp.Data.GraphQL.Relay/Connections.fs
either

fields =[
Define.Field("hasNextPage", Boolean,"When paginating forwards, are there more items?",fun _ pageInfo -> pageInfo.HasNextPage)
Define.Field("hasPreviousPage", Boolean,"When paginating backwards, are there more items?",fun _ pageInfo -> pageInfo.HasPreviousPage)
Define.Field("startCursor", Nullable String,"When paginating backwards, the cursor to continue.",fun _ pageInfo -> pageInfo.StartCursor)
Define.Field("endCursor", Nullable String,"When paginating forwards, the cursor to continue.",fun _ pageInfo -> pageInfo.EndCursor)])

or

fields =[ Define.Field("hasNextPage", Boolean,"When paginating forwards, are there more items?",fun _ pageInfo -> pageInfo.HasNextPage)
Define.Field("hasPreviousPage", Boolean,"When paginating backwards, are there more items?",fun _ pageInfo -> pageInfo.HasPreviousPage)
Define.Field("startCursor", Nullable String,"When paginating backwards, the cursor to continue.",fun _ pageInfo -> pageInfo.StartCursor)
Define.Field("endCursor", Nullable String,"When paginating forwards, the cursor to continue.",fun _ pageInfo -> pageInfo.EndCursor)])

What Fantomas will do?

@kevin-lulakevin-lula left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me

@xperiandri

Copy link
Copy Markdown
Collaborator

@okhorsunenko-lula so will you replace the old Relay folder content with content from the modern Relay?

@okhorsunenko-lula
okhorsunenko-lula marked this pull request as ready for review January 20, 2023 18:42

@xperiandrixperiandri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@okhorsunenko-lula, looks good!
Fixing a few comments and a workflow update left

Comment threadsamples/relay-modern-starter-kit/src/app.jsx Outdated
Comment threadsamples/relay-modern-starter-kit/src/components/user.jsx Outdated
Comment threadsamples/relay-modern-starter-kit/src/components/user.jsx Outdated
Comment threadsrc/FSharp.Data.GraphQL.Relay/FSharp.Data.GraphQL.Relay.fsproj Outdated
Comment threadsamples/star-wars-api/Schema.fs Outdated
Comment threadsamples/star-wars-api/Schema.fs Outdated
@okhorsunenko-lula
okhorsunenko-lulaforce-pushed the LHK-590-implement-graphql-relay-cursor branch 2 times, most recently from 68f05dc to b9e3efdCompareJanuary 23, 2023 13:55
Comment thread.github/workflows/publish_ci.yml Outdated
Comment thread.github/workflows/publish_release.yml Outdated
Comment threadFSharp.Data.GraphQL.sln Outdated
@xperiandri
xperiandriforce-pushed the LHK-590-implement-graphql-relay-cursor branch 2 times, most recently from ea82c58 to 7d7e265CompareJanuary 24, 2023 05:55
@xperiandri
xperiandriforce-pushed the LHK-590-implement-graphql-relay-cursor branch from 7d7e265 to 75022b9CompareJanuary 24, 2023 05:59
@xperiandri

Copy link
Copy Markdown
Collaborator

@okhorsunenko-lula test Relay again. I made Edges not nullable. I don't understand why the original author made them nullable. Have you seen anything about that in spec?

Comment threadsamples/relay-modern-starter-kit/server.fsx Outdated
@xperiandri

Copy link
Copy Markdown
Collaborator

@okhorsunenko-lula we need to test the sample manually again. Then we can merge

@okhorsunenko-lula

okhorsunenko-lula commented Feb 3, 2023

Copy link
Copy Markdown
ContributorAuthor

@xperiandri tested, looks good and works, attaching the screenshot
Can you please merge it?

image

@xperiandri
xperiandriforce-pushed the LHK-590-implement-graphql-relay-cursor branch from 7daca9f to ca221a8CompareFebruary 4, 2023 00:53
@xperiandrixperiandri changed the title LHK-590 add relay projectLHK-590 Added modern GraphQL Relay sample project with ReactFeb 4, 2023
@xperiandri
xperiandri enabled auto-merge (squash) February 4, 2023 00:57
@xperiandri
xperiandri merged commit fb63c27 into fsprojects:devFeb 4, 2023
@xperiandri
xperiandri deleted the LHK-590-implement-graphql-relay-cursor branch February 4, 2023 01:20
xperiandri pushed a commit to Lula-Archive/FSharp.Data.GraphQL that referenced this pull request Aug 7, 2023
xperiandri pushed a commit to Lula-Archive/FSharp.Data.GraphQL that referenced this pull request Aug 7, 2023
xperiandri pushed a commit that referenced this pull request Aug 10, 2023
Co-authored-by: Andrii Chebukin <andrii@lula.is>
xperiandri pushed a commit to Lula-Archive/FSharp.Data.GraphQL that referenced this pull request Aug 10, 2023
Sign up for freeto 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

@okhorsunenko-lula@xperiandri@kevin-lula