Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from the-control-group/relay-connection
Fix #32 - use relay-style connections
- Loading branch information
Showing
29 changed files
with
808 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLAuthorityEdge } from "./GraphQLAuthorityEdge"; | ||
|
||
export const GraphQLAuthorityConnection = new GraphQLObjectType({ | ||
name: "AuthorityConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLAuthorityEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLAuthority } from "./GraphQLAuthority"; | ||
|
||
export const GraphQLAuthorityEdge = new GraphQLObjectType({ | ||
name: "AuthorityEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLAuthority } | ||
}) | ||
}); |
11 changes: 11 additions & 0 deletions
11
packages/authx/src/graphql/GraphQLAuthorizationConnection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLAuthorizationEdge } from "./GraphQLAuthorizationEdge"; | ||
|
||
export const GraphQLAuthorizationConnection = new GraphQLObjectType({ | ||
name: "AuthorizationConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLAuthorizationEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLAuthorization } from "./GraphQLAuthorization"; | ||
|
||
export const GraphQLAuthorizationEdge = new GraphQLObjectType({ | ||
name: "AuthorizationEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLAuthorization } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLClientEdge } from "./GraphQLClientEdge"; | ||
|
||
export const GraphQLClientConnection = new GraphQLObjectType({ | ||
name: "ClientConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLClientEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLClient } from "./GraphQLClient"; | ||
|
||
export const GraphQLClientEdge = new GraphQLObjectType({ | ||
name: "ClientEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLClient } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLCredentialEdge } from "./GraphQLCredentialEdge"; | ||
|
||
export const GraphQLCredentialConnection = new GraphQLObjectType({ | ||
name: "CredentialConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLCredentialEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLCredential } from "./GraphQLCredential"; | ||
|
||
export const GraphQLCredentialEdge = new GraphQLObjectType({ | ||
name: "CredentialEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLCredential } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLGrantEdge } from "./GraphQLGrantEdge"; | ||
|
||
export const GraphQLGrantConnection = new GraphQLObjectType({ | ||
name: "GrantConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLGrantEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLGrant } from "./GraphQLGrant"; | ||
|
||
export const GraphQLGrantEdge = new GraphQLObjectType({ | ||
name: "GrantEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLGrant } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { GraphQLBoolean, GraphQLObjectType, GraphQLString } from "graphql"; | ||
|
||
export const GraphQLPageInfo = new GraphQLObjectType({ | ||
name: "PageInfo", | ||
description: | ||
"See: https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo", | ||
fields: () => ({ | ||
hasPreviousPage: { type: GraphQLBoolean }, | ||
hasNextPage: { type: GraphQLBoolean }, | ||
startCursor: { type: GraphQLString }, | ||
endCursor: { type: GraphQLString } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLList, GraphQLNonNull, GraphQLObjectType } from "graphql"; | ||
import { GraphQLPageInfo } from "./GraphQLPageInfo"; | ||
import { GraphQLRoleEdge } from "./GraphQLRoleEdge"; | ||
|
||
export const GraphQLRoleConnection = new GraphQLObjectType({ | ||
name: "RoleConnection", | ||
fields: () => ({ | ||
pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, | ||
edges: { type: new GraphQLList(GraphQLRoleEdge) } | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { GraphQLObjectType, GraphQLString } from "graphql"; | ||
import { GraphQLRole } from "./GraphQLRole"; | ||
|
||
export const GraphQLRoleEdge = new GraphQLObjectType({ | ||
name: "RoleEdge", | ||
fields: () => ({ | ||
cursor: { type: GraphQLString }, | ||
node: { type: GraphQLRole } | ||
}) | ||
}); |
Oops, something went wrong.