Nextjs13 Graphql apollo config

clock icon

asked 11 months ago.

Answers

4 Answers

eye

60 views

I am trying to set up a graphql frontend application with nextjs13 but with the new folder structure as there ins't _app.tsx I am wondering how to setup

Before we use to wrap the entire app like this

 <ApolloProvider client={client}>
    <Component {...pageProps} />
  </ApolloProvider> 
 

Now how to set up that?

4 Answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

checking pagination by creating dummy answers

i have no answer to this question 

// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});
// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});
// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});
// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});
// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});
// ⁡⁣⁣⁢Increment User's Reputation by +1/-1 for upvoting/revoking
await UserModel.findByIdAndUpdate(userId, { $inc: { reputation: hasupVoted ? -2 : 2 } });

// ⁡⁣⁣⁢Increment author's reputation by +15/-15⁡ for recieving an upvote/downvote to the answer
await UserModel.findByIdAndUpdate(answer.author, {
$inc: { reputation: hasupVoted ? -15 : 15 },
});

1

Write your answer here

Top Questions