weixin_39915668
2021-01-12 14:39 阅读 5

Meteor apollo conflicts with vue-apollo for apollo client

WARNING: npm peer requirements (for apollo) not installed: - apollo-client.5.26 installed, apollo-client@^1.0.0-rc.6 needed

Read more about installing npm peer dependencies: http://guide.meteor.com/using-packages.html#peer-npm-dependencies

该提问来源于开源项目:vuejs/vue-apollo

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

12条回答 默认 最新

  • weixin_39695306 weixin_39695306 2021-01-12 14:39

    I imagine you did a meteor update and the like. ping

    点赞 评论 复制链接分享
  • weixin_39695306 weixin_39695306 2021-01-12 14:39

    Did you try manually installing the latest version of apollo?

    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    Best I can tell this happened after installed graphql-tag, maybe that bumped apollo? Meteor update though will cause conflict. If you don't remember 5 days ago I belief you made vue-apollo compatible with latest version of apollo.

    点赞 评论 复制链接分享
  • weixin_39999730 weixin_39999730 2021-01-12 14:39

    please install the latest version of apollo-client, and see if it works.

    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    FYI, vue-apollo has dependency on 0.5.

    点赞 评论 复制链接分享
  • weixin_39695306 weixin_39695306 2021-01-12 14:39

    You need to update to the latest vue-apollo release.

    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    Missing auto attribute on result Object {skill: Array(1), Symbol(id): "ROOT_QUERY"} Data is right, but wont render. Resolvers that just return arghs work.

    I just edit packages.json after "npm outdated". Tried rebuild and force update. "graphql-tools": "^0.11.0", "vue-apollo": "v2.1.0-beta.2", "apollo-client": "1.0.1",

    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    Full error:

    
    Missing auto attribute on result Object {skill: Array(1), Symbol(id): "ROOT_QUERY"}skill: Array(1)0: ObjecttypeName: "Gunnery"__typename: "Skill"Symbol(id): "ROOT_QUERY.skill({"typeName":"Gunn"}).0"__proto__: Objectlength: 1__proto__: Array(0)Symbol(id): "ROOT_QUERY"__proto__: Object
    nextResult @ modules.js?hash=b299974…:19770
    (anonymous) @ modules.js?hash=b299974…:15795
    next @ modules.js?hash=b299974…:15793
    (anonymous) @ modules.js?hash=b299974…:16362
    (anonymous) @ modules.js?hash=b299974…:16730
    (anonymous) @ modules.js?hash=b299974…:16727
    QueryManager.broadcastQueries @ modules.js?hash=b299974…:16724
    (anonymous) @ modules.js?hash=b299974…:16109
    dispatch @ modules.js?hash=b299974…:17745
    (anonymous) @ modules.js?hash=b299974…:16912
    (anonymous) @ modules.js?hash=b299974…:15341
    (anonymous) @ modules.js?hash=b299974…:16667
    (anonymous) @ meteor.js?hash=27829e9…:1105
    
    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    One of fields for object being queried, although I didn't ask for it in query and batch is on.

    
    Skill: {
        requiredSkills(root, args) {
          return db.query(
            `SELECT
        typeName,
        it.typeId,
        COALESCE(skillLevel.valueFloat,
                skillLevel.valueInt) AS requiredLevel
    FROM
        dgmTypeAttributes attr
            INNER JOIN
        invTypes it ON it.typeid = COALESCE(attr.valueint, attr.valuefloat)
            INNER JOIN
        dgmTypeAttributes skillLevel ON skillLevel.typeid = COALESCE(attr.valueint, attr.valuefloat)
    WHERE
        attr.typeid = :id
            AND ((attr.attributeID = 182
            AND skillLevel.attributeID = 277)
            OR (attr.attributeID = 183
            AND skillLevel.attributeID = 278)
            OR (attr.attributeID = 184
            AND skillLevel.attributeID = 279)
            OR (attr.attributeID = 1285
            AND skillLevel.attributeID = 1286)
            OR (attr.attributeID = 1289
            AND skillLevel.attributeID = 1287)
            OR (attr.attributeID = 1290
            AND skillLevel.attributeID = 1288))`
            ,
          { replacements: {id: root.typeId}, type: Sequelize.QueryTypes.SELECT }
        )
        }
      },
    
    点赞 评论 复制链接分享
  • weixin_39915668 weixin_39915668 2021-01-12 14:39

    Will there be migration guide for when you release this?

    点赞 评论 复制链接分享
  • weixin_39695306 weixin_39695306 2021-01-12 14:39

    Well, it will be short but I can write one. :smile:

    点赞 评论 复制链接分享
  • weixin_39695306 weixin_39695306 2021-01-12 14:39

    Please comment if you still have the issue.

    点赞 评论 复制链接分享

相关推荐