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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL schema update #2177

Merged
merged 7 commits into from Jul 6, 2019

Handle deprecation of GraphQL `timeline` connections

  • Loading branch information...
smashwilson committed Jun 6, 2019
commit 9b5a7f518b7baf45a50c646d88e4fee7c6e8e474
@@ -10,15 +10,14 @@ export default createPaginationContainer(IssueishTimelineView, {
timelineCursor: {type: "String"}
) {
url
timeline(
timelineItems(
first: $timelineCount, after: $timelineCursor
) @connection(key: "IssueTimelineController_timeline") {
) @connection(key: "IssueTimelineController_timelineItems") {
pageInfo { endCursor hasNextPage }
edges {
cursor
node {
__typename
...commitsView_nodes
...issueCommentView_item
...crossReferencedEventsView_nodes
}
@@ -11,7 +11,8 @@ export default createPaginationContainer(IssueishTimelineView, {
) {
url
...headRefForcePushedEventView_issueish
timeline(first: $timelineCount, after: $timelineCursor) @connection(key: "prTimelineContainer_timeline") {
timelineItems(first: $timelineCount, after: $timelineCursor)
@connection(key: "prTimelineContainer_timelineItems") {
pageInfo { endCursor hasNextPage }
edges {
cursor
@@ -41,7 +41,7 @@ export class BareCommitCommentThreadView extends React.Component {

export default createFragmentContainer(BareCommitCommentThreadView, {
item: graphql`
fragment commitCommentThreadView_item on CommitCommentThread {
fragment commitCommentThreadView_item on PullRequestCommitCommentThread {
commit { oid }
comments(first: 100) {
edges {
@@ -9,11 +9,13 @@ export class BareCommitsView extends React.Component {
static propTypes = {
nodes: PropTypes.arrayOf(
PropTypes.shape({
author: PropTypes.shape({
name: PropTypes.string,
user: PropTypes.shape({
login: PropTypes.string.isRequired,
}),
commit: PropTypes.shape({
author: PropTypes.shape({
name: PropTypes.string,
user: PropTypes.shape({
login: PropTypes.string.isRequired,
}),
}).isRequired,
}).isRequired,
}).isRequired,
).isRequired,
@@ -88,9 +90,11 @@ export class BareCommitsView extends React.Component {

export default createFragmentContainer(BareCommitsView, {
nodes: graphql`
fragment commitsView_nodes on Commit @relay(plural: true) {
id author { name user { login } }
...commitView_commit
fragment commitsView_nodes on PullRequestCommit @relay(plural: true) {
commit {
id author { name user { login } }
...commitView_commit
}
}
`,
});
ProTip! Use n and p to navigate between commits in a pull request.
You can鈥檛 perform that action at this time.