Skip to content

Commit b119e7a

Browse files
committed
(chore) - remove resolve logic
1 parent 946b9bd commit b119e7a

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/components/LinkList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export const FEED_QUERY = gql`
99
feed(first: $first, skip: $skip, orderBy: $orderBy) {
1010
links {
1111
id
12-
createdAt
1312
url
1413
description
1514
postedBy {
@@ -22,6 +21,7 @@ export const FEED_QUERY = gql`
2221
id
2322
}
2423
}
24+
createdAt
2525
}
2626
count
2727
}
@@ -34,7 +34,6 @@ const NEW_LINKS_SUBSCRIPTION = gql`
3434
id
3535
url
3636
description
37-
createdAt
3837
postedBy {
3938
id
4039
name
@@ -45,6 +44,7 @@ const NEW_LINKS_SUBSCRIPTION = gql`
4544
id
4645
}
4746
}
47+
createdAt
4848
}
4949
}
5050
`;

src/index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import App from "./components/App";
1616
import { AUTH_TOKEN, LINKS_PER_PAGE } from './constants';
1717
import { FEED_QUERY } from './components/LinkList';
1818
import * as serviceWorker from "./serviceWorker";
19-
// import { timeDifferenceForDate } from './utils';
2019

2120
const cache = cacheExchange({
2221
keys: {
@@ -28,19 +27,6 @@ const cache = cacheExchange({
2827
// Optimistic is not possible due to the nature of the data-structure
2928
// every vote needs to have an unique id for a unique userId...
3029

31-
// We could write a custom resolver to format the datetime of a post
32-
// to indicate the text of x time ago.
33-
// TODO: found inconsistency with resolvers
34-
// Initial write does not respect the resolvers given for querying data.
35-
// resolvers: {
36-
// Link: {
37-
// createdAt: (parent) => {
38-
// console.log('in link resolver');
39-
// return timeDifferenceForDate(parent.createdAt);
40-
// }
41-
// }
42-
// },
43-
4430
// Mutations that need updates due to adding/removing/... to a list
4531
// Will most likely come here. We can't make assumptions for adding to
4632
// a list.

0 commit comments

Comments
 (0)