Adrián
03/20/2018, 11:46 AMAdrián
03/20/2018, 11:54 AMdavidyoung
03/20/2018, 2:55 PMprisma deploy
davidyoung
03/20/2018, 2:56 PMdavidyoung
03/20/2018, 2:57 PMVendicto
03/20/2018, 3:35 PMconst getPosts = graphql(GET_POSTS, {
options: {
variables: {
first: 3
}
},
alias: 'GetPostsAlias',
props: ({data: { loading, fetchMore, allPosts } }) => {
return {
loading,
allPosts,
loadMorePosts(id, next) {
let variables = {
last: 1,
before: id,
};
if(next){
variables = {
first: 1,
after: id
}
}
return fetchMore({
query: GET_POSTS,
variables,
updateQuery: (previousResult, { fetchMoreResult }) => {
if (!fetchMoreResult.allPosts.length) { return previousResult; }
return {
...previousResult,
allPosts: next
?[...previousResult.allPosts, ...fetchMoreResult.allPosts]
:[...fetchMoreResult.allPosts, ...previousResult.allPosts]
}
},
});
}
};
}
});
Error :
Unhandled (in react-apollo:GetPostsAlias(Apollo(BrowseScreen))) Error: GraphQL error: Cannot return null for non-nullable type (line 10, column 5):
How to fix this ?ed
03/20/2018, 4:18 PMrein
03/20/2018, 6:08 PMGilad Shoham
03/20/2018, 6:30 PMnoahdavis
03/20/2018, 6:38 PMwesbos
03/20/2018, 7:37 PMwesbos
03/20/2018, 7:37 PMwesbos
03/20/2018, 7:37 PMtsdexter
03/20/2018, 8:46 PMsubscription {
Ticket {
node {
id
status {
name
}
}
updatedFields
}
}
It picks up if I change a text field like description
but not if I update the status
dsoraluz
03/20/2018, 10:48 PMpicosam
03/21/2018, 10:36 AMNote that the CLI will load environment variables from 3 different locations and in the following order:
- The local environment
- A file specified with theparameter--dotenv
- if theMy question is, doeswas omitted, a file called--dotenvargument
in the same directory.env
dotenv
take care of this entirely or is there code that makes this happen as indicated above?
UPDATE: I just did a few tests and it seems that dotenv
takes care of that order indeed.rein
03/21/2018, 11:29 AMnghiepit
03/21/2018, 11:59 AMresolvers/index.ts
file.Vendicto
03/21/2018, 12:10 PMzebapy
03/21/2018, 12:15 PMJoe
03/21/2018, 3:26 PMJoe
03/21/2018, 3:26 PMJoe
03/21/2018, 3:27 PMJoe
03/21/2018, 3:28 PMlawjolla
03/21/2018, 4:18 PMsajmil
03/21/2018, 6:39 PMryan
03/21/2018, 7:37 PMrein
03/21/2018, 8:01 PMDaniel K.
03/21/2018, 8:02 PMTill
03/21/2018, 8:24 PM