-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from nyawach/feature/add-apollo-client
apollo-client 投げれるようにするまで
- Loading branch information
Showing
23 changed files
with
3,747 additions
and
144 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
query getTest { | ||
launchesPast(limit: 10) { | ||
mission_name | ||
launch_date_local | ||
launch_site { | ||
site_name_long | ||
} | ||
links { | ||
article_link | ||
video_link | ||
} | ||
rocket { | ||
rocket_name | ||
first_stage { | ||
cores { | ||
flight | ||
core { | ||
reuse_count | ||
status | ||
} | ||
} | ||
} | ||
second_stage { | ||
payloads { | ||
payload_type | ||
payload_mass_kg | ||
payload_mass_lbs | ||
} | ||
} | ||
} | ||
ships { | ||
name | ||
home_port | ||
image | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
0022-nuxt-bridge/frontend/assets/util/createApolloClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NuxtAppOptions } from '@nuxt/types' | ||
import { createHttpLink } from 'apollo-link-http' | ||
import fetch from 'isomorphic-fetch' | ||
|
||
export default (uri: string, app: NuxtAppOptions) => ({ | ||
defaultHttpLink: false, | ||
link: createHttpLink({ | ||
uri, | ||
credentials: 'same-origin', | ||
fetch: async (uri: string, options) => { | ||
return fetch(uri, options) | ||
}, | ||
}), | ||
}) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
0022-nuxt-bridge/pages/index.vue → 0022-nuxt-bridge/frontend/pages/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { Context } from '@nuxt/types' | ||
import createApolloClient from '~/assets/util/createApolloClient' | ||
|
||
export default ({ app }: Context) => createApolloClient('https://api.spacex.land/graphql', app) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
declare module '*.gql' { | ||
import { DocumentNode } from 'graphql' | ||
|
||
const content: DocumentNode | ||
export default content | ||
} | ||
|
||
declare module '*.graphql' { | ||
import { DocumentNode } from 'graphql' | ||
|
||
const content: DocumentNode | ||
export default content | ||
} |
Oops, something went wrong.