Skip to content

Commit

Permalink
remove yoga
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkie committed Nov 26, 2020
1 parent d97d384 commit 7c50200
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"@prisma/client": "^2.12.0",
"apollo-server": "^2.19.0",
"bcryptjs": "2.4.3",
"graphql-yoga": "1.18.3",
"jsonwebtoken": "8.5.1"
},
"devDependencies": {
Expand Down
Binary file modified server/prisma/dev.db
Binary file not shown.
3 changes: 1 addition & 2 deletions server/src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const { ApolloServer } = require('apollo-server');
const { ApolloServer, PubSub } = require('apollo-server');
const { PrismaClient } = require('@prisma/client');
const Query = require('./resolvers/Query');
const Mutation = require('./resolvers/Mutation');
const Subscription = require('./resolvers/Subscription');
const User = require('./resolvers/User');
const Link = require('./resolvers/Link');
const Vote = require('./resolvers/Vote');
const { PubSub } = require('graphql-yoga');
const fs = require('fs');
const path = require('path');
const { getUserId } = require('./utils');
Expand Down
2 changes: 0 additions & 2 deletions server/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ function getTokenPayload(token) {

function getUserId(req, authToken) {
if (req) {
console.log('has req');
const authHeader = req.headers.authorization;
if (authHeader) {
const token = authHeader.replace('Bearer ', '');
Expand All @@ -18,7 +17,6 @@ function getUserId(req, authToken) {
return userId;
}
} else if (authToken) {
console.log('has auth header', authToken);
const { userId } = getTokenPayload(authToken);
return userId;
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/CreateLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ const CreateLink = () => {
}
});

console.log('the data', data);

cache.writeQuery({
query: FEED_QUERY,
data: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Link from './Link';
const FEED_SEARCH_QUERY = gql`
query FeedSearchQuery($filter: String!) {
feed(filter: $filter) {
id
links {
id
url
Expand Down

0 comments on commit 7c50200

Please sign in to comment.