Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
next.js
提交
bd6e9710
N
next.js
项目概览
CoCo_Code_Op2
/
next.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
next.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd6e9710
编写于
6月 20, 2019
作者:
T
Ting-Hsiang Hsu
提交者:
Luis Fernando Alvarez D
6月 19, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
(example/with-react-relay-network-modern) Fix example (#7590)
上级
204e5a71
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
12 deletion
+12
-12
examples/with-react-relay-network-modern/package.json
examples/with-react-relay-network-modern/package.json
+10
-10
examples/with-react-relay-network-modern/pages/_app.js
examples/with-react-relay-network-modern/pages/_app.js
+2
-2
未找到文件。
examples/with-react-relay-network-modern/package.json
浏览文件 @
bd6e9710
...
...
@@ -8,26 +8,26 @@
"build"
:
"next build"
,
"start"
:
"next start"
,
"relay"
:
"relay-compiler --src ./ --exclude '**/.next/**' '**/node_modules/**' '**/test/**' '**/__generated__/**' --exclude '**/schema/**' --schema ./schema/schema.graphql"
,
"schema"
:
"graphql get-schema dev"
"schema"
:
"graphql get-schema
-e
dev"
},
"author"
:
""
,
"license"
:
"ISC"
,
"dependencies"
:
{
"dotenv"
:
"^
4
.0.0"
,
"dotenv"
:
"^
8
.0.0"
,
"dotenv-webpack"
:
"^1.5.4"
,
"graphql"
:
"^
0.13.2
"
,
"isomorphic-fetch"
:
"2.2.1"
,
"graphql"
:
"^
14.3.0
"
,
"isomorphic-fetch"
:
"
^
2.2.1"
,
"next"
:
"latest"
,
"react"
:
"^16.7.0"
,
"react-dom"
:
"^16.7.0"
,
"react-relay"
:
"^
1.5
.0"
,
"react-relay-network-modern"
:
"
2.4
.0"
,
"react-relay-network-modern-ssr"
:
"
1.2.1
"
"react-relay"
:
"^
5.0
.0"
,
"react-relay-network-modern"
:
"
^4.0
.0"
,
"react-relay-network-modern-ssr"
:
"
^1.2.2
"
},
"devDependencies"
:
{
"babel-plugin-relay"
:
"^
1.4.1
"
,
"babel-plugin-relay"
:
"^
5.0.0
"
,
"graphcool"
:
"^1.2.1"
,
"graphql-cli"
:
"^
1.0.0-beta.4
"
,
"relay-compiler"
:
"^
1.5
.0"
"graphql-cli"
:
"^
3.0.11
"
,
"relay-compiler"
:
"^
5.0
.0"
}
}
examples/with-react-relay-network-modern/pages/_app.js
浏览文件 @
bd6e9710
...
...
@@ -11,7 +11,7 @@ export default class App extends NextApp {
:
{}
try
{
if
(
initEnvironment
)
{
if
(
initEnvironment
&&
Component
.
query
)
{
const
{
environment
,
relaySSR
}
=
initEnvironment
()
await
fetchQuery
(
environment
,
Component
.
query
,
variables
)
...
...
@@ -35,7 +35,7 @@ export default class App extends NextApp {
const
environment
=
createEnvironment
(
relayData
,
JSON
.
stringify
({
queryID
:
Component
.
query
?
Component
.
query
().
name
:
undefined
,
queryID
:
Component
.
query
?
Component
.
query
().
params
.
name
:
undefined
,
variables
})
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录