现在在项目中大量的使用 graphql,但用的版本是3年前的版本。

3年前包的url:github.com/neelance/graphql-go

现在的url:github.com/graph-gophers/graphql-go

升级成go mod之后出错了,因为graphql的语法发生了变化。这时候有一个搞笑的问题,你需要找到3年前的那个版本。

github.com/graph-gophers/graphql-go v0.0.0-20170406083916-01ab5128e53e
 
但是3年前的路径是 github.com/neelance/graphql-go,代码里都是这样使用的。
这时候go mod tidy,

go: github.com/graph-gophers/graphql-go imports

github.com/neelance/graphql-go/errors: github.com/neelance/graphql-go@v0.0.0-20200207002730-8334863f2c8b: parsing go.mod:

module declares its path as: github.com/graph-gophers/graphql-go

but was required as: github.com/neelance/graphql-go

 
好吧 replace 吧
replace github.com/neelance/graphql-go => github.com/graph-gophers/graphql-go v0.0.0--01ab5128e53e

require github.com/neelance/graphql-go v0.0.0--
如果代码导入错误的,就替换所有的代码

最新文章

  1. 总结30个CSS3选择器
  2. spring boot(二):web综合开发
  3. 在SQL Server里我们为什么需要意向锁(Intent Locks)?
  4. 定时自动关闭messagebox
  5. 24.编写一个Car类,具有String类型的属性品牌,具有功能drive; 定义其子类Aodi和Benchi,具有属性:价格、型号;具有功能:变速; 定义主类E,在其main方法中分别创建Aodi和Benchi的对象并测试对象的特 性。
  6. BurpSuite使用设置
  7. linux命令:tail
  8. [Python] Python 之 __new__() 方法与实例化
  9. 【BZOJ1011】【HNOI2008】遥远的行星
  10. 转--Android实现ListView过滤功能,继承于BaseAdapter,非ArrayAdapter。
  11. Swiper之滑块2
  12. JavaScript入门(6)
  13. objective-c在Xcode中@property相关参数的解释
  14. iOS 摇一摇的实现-备用
  15. .OCX、.dll文件注册命令Regsvr32的使用
  16. 轻松搞定Linux端口转发
  17. Android屏幕适配问题详解
  18. java memcache应用
  19. Go语言数组的使用
  20. linux 下文件误删恢复

热门文章

  1. .Net 经典案例
  2. Day4-T1
  3. python基础笔记:判断与循环
  4. 一百零四、SAP中ALV事件之十六,让ALV表格能点击修改
  5. C++使用 scanf函数
  6. 学术Essay写作如何体现逻辑的应用
  7. 用Git管理项目进行版本控制
  8. ELK 安装Beat
  9. UVA - 11149 Power of Matrix(矩阵倍增)
  10. python 列表和字符串