diff --git a/components/Author.vue b/components/Author.vue index 48236f8c9..f307bc19b 100644 --- a/components/Author.vue +++ b/components/Author.vue @@ -136,7 +136,7 @@ export default { }, author() { return this.hasAuthor - ? this.post.author.User + ? this.post.author : { name: 'Anonymus' } diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index 38646e386..e49233f5d 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -64,11 +64,9 @@ export default gql(` image createdAt author { - User { - id - avatar - name - } + id + avatar + name } } } diff --git a/nuxt.config.js b/nuxt.config.js index 59588a8ee..b763fa877 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,14 +1,13 @@ const pkg = require('./package') -const envWhitelist = [ - 'NODE_ENV', - 'BACKEND_URL', - 'MAINTENANCE' -] - +const envWhitelist = ['NODE_ENV', 'BACKEND_URL', 'MAINTENANCE'] +const dev = process.env.NODE_ENV !== 'production' module.exports = { mode: 'universal', + dev: dev, + debug: dev ? 'nuxt:*,app' : null, + transition: { name: 'slide-up', mode: 'out-in' @@ -129,7 +128,7 @@ module.exports = { // }, // required clientConfigs: { - default: '~/plugins/apollo-config.js', + default: '~/plugins/apollo-config.js' } }, diff --git a/pages/index.vue b/pages/index.vue index e267c6121..0a68ff8e9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -86,20 +86,18 @@ export default { slug image author { - User { + id + avatar + slug + name + contributionsCount + shoutedCount + commentsCount + followedByCount + badges { id - avatar - slug - name - contributionsCount - shoutedCount - commentsCount - followedByCount - badges { - id - key - icon - } + key + icon } } commentsCount diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 528be4fd4..9bd14f2a7 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -120,20 +120,18 @@ export default { slug image author { - User { + id + slug + name + avatar + shoutedCount + contributionsCount + commentsCount + followedByCount + badges { id - slug - name - avatar - shoutedCount - contributionsCount - commentsCount - followedByCount - badges { - id - key - icon - } + key + icon } } tags { @@ -146,20 +144,18 @@ export default { createdAt deleted author { - User { + id + slug + name + avatar + shoutedCount + contributionsCount + commentsCount + followedByCount + badges { id - slug - name - avatar - shoutedCount - contributionsCount - commentsCount - followedByCount - badges { - id - key - icon - } + key + icon } } } diff --git a/pages/post/_slug/more-info.vue b/pages/post/_slug/more-info.vue index 6c704a245..811e283de 100644 --- a/pages/post/_slug/more-info.vue +++ b/pages/post/_slug/more-info.vue @@ -79,19 +79,17 @@ export default { shoutedCount commentsCount author { - User { + id + name + slug + avatar + contributionsCount + followedByCount + commentsCount + badges { id - name - slug - avatar - contributionsCount - followedByCount - commentsCount - badges { - id - key - icon - } + key + icon } } }