diff --git a/.circleci/config.yml b/.circleci/config.yml index bb6b271c..a4a1112b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,5 +32,5 @@ jobs: name: Tests command: yarn test environment: - HTTP_ENDPOINT: https://api.graph.cool/simple/v1/cjvqu5trs23l90138hm4t8uof - WS_ENDPOINT: wss://subscriptions.us-west-2.graph.cool/v1/cjvqu5trs23l90138hm4t8uof \ No newline at end of file + HTTP_ENDPOINT: https://rickandmortyapi.com/graphql + WS_ENDPOINT: wss://subscriptions.us-west-2.graph.cool/v1/cjvqu5trs23l90138hm4t8uof diff --git a/test/fixture-local-state/plugins/apollo-config.js b/test/fixture-local-state/plugins/apollo-config.js index 41669030..9e5f4ecf 100644 --- a/test/fixture-local-state/plugins/apollo-config.js +++ b/test/fixture-local-state/plugins/apollo-config.js @@ -17,7 +17,7 @@ export default function (ctx) { } } }, - onCacheInit: cache => { + onCacheInit: (cache) => { const data = { connected: false } diff --git a/test/fixture/pages/asyncData.vue b/test/fixture/pages/asyncData.vue index ded68dd7..fae81d06 100644 --- a/test/fixture/pages/asyncData.vue +++ b/test/fixture/pages/asyncData.vue @@ -1,6 +1,6 @@ @@ -15,19 +15,19 @@ export default { }, data () { return { - allPosts: [] + episodesByIds: [] } }, async asyncData({ app }) { const client = app.apolloProvider.defaultClient - const allPosts = await client.query({ + const episodesByIds = await client.query({ query: gql`{ - allPosts { - id + episodesByIds(ids: [1]) { + name } }` - }).then(({ data }) => data && data.allPosts) - return { allPosts } + }).then(({ data }) => data && data.episodesByIds) + return { episodesByIds } } } diff --git a/test/fixture/pages/mounted.vue b/test/fixture/pages/mounted.vue index 85aa6573..9059c960 100644 --- a/test/fixture/pages/mounted.vue +++ b/test/fixture/pages/mounted.vue @@ -1,6 +1,6 @@ @@ -15,17 +15,17 @@ export default { }, data () { return { - allPosts: [] + episodesByIds: [] } }, async mounted() { - this.allPosts = await this.$apollo.query({ + this.episodesByIds = await this.$apollo.query({ query: gql`{ - allPosts { - id + episodesByIds(ids: [1]) { + name } }` - }).then(({ data }) => data && data.allPosts) + }).then(({ data }) => data && data.episodesByIds) } } diff --git a/test/fixture/pages/normalQuery.vue b/test/fixture/pages/normalQuery.vue index 5cde97f1..41db38bc 100644 --- a/test/fixture/pages/normalQuery.vue +++ b/test/fixture/pages/normalQuery.vue @@ -1,6 +1,6 @@ @@ -15,14 +15,14 @@ export default { }, data () { return { - allPosts: [] + episodesByIds: [] } }, apollo: { - allPosts: { + episodesByIds: { query: gql`{ - allPosts { - id + episodesByIds(ids: [1]) { + name } }` } diff --git a/test/module.test.js b/test/module.test.js index bd7f4d42..cb549315 100644 --- a/test/module.test.js +++ b/test/module.test.js @@ -26,12 +26,12 @@ describe('basic', () => { test('normalQuery', async () => { const html = await get('/normalQuery') - expect(html).toContain('cjw1jhoxi1f4g0112ayaq3pyz') + expect(html).toContain('Pilot') }) test('asyncData', async () => { const html = await get('/asyncData') - expect(html).toContain('cjw1jhoxi1f4g0112ayaq3pyz') + expect(html).toContain('Pilot') }) test('mounted & smart query', async () => {