Giter VIP home page Giter VIP logo

Comments (20)

matteodem avatar matteodem commented on April 27, 2024 1

I'll test it later today

from apollo.

matteodem avatar matteodem commented on April 27, 2024 1

This has been solved in the meantime, thanks for helping out

from apollo.

Akryum avatar Akryum commented on April 27, 2024

I can't replicate this. I just tested with the latest meteor, latest apollo-client, and I could connect successfully to the meteor server apollo, and to an external graphql server.

Edit: here is a working example.

from apollo.

matteodem avatar matteodem commented on April 27, 2024

oh, I used a custom frontend (not meteorjs). But thanks for showing me an example, I'll try setting up the config similiarly to how the apollo package does.

from apollo.

matteodem avatar matteodem commented on April 27, 2024

Try upgrading the npm packages. The problem comes up when I upgrade graphql-tools to 0.8.4

from apollo.

Akryum avatar Akryum commented on April 27, 2024

I just tested with these versions and it works:
https://github.com/Akryum/meteor-vue-component/blob/master/package.json
https://github.com/Akryum/meteor-vue-component/blob/master/.meteor/versions#L17

from apollo.

matteodem avatar matteodem commented on April 27, 2024

Still doesn't work. Did you already try connecting with apollo-client from a custom webpack project? I can upload the project if it's not reproduceable for you

from apollo.

Akryum avatar Akryum commented on April 27, 2024

Yes, I'm working on an official vuejs.org app with Webpack and vue-apollo + an Apollo server.

from apollo.

Akryum avatar Akryum commented on April 27, 2024

Do you still encounter this issue?

from apollo.

matteodem avatar matteodem commented on April 27, 2024

Yes... I'll upload the repository again later today and hopefully you can reproduce it.

from apollo.

Akryum avatar Akryum commented on April 27, 2024

from apollo.

matteodem avatar matteodem commented on April 27, 2024

here it is: https://github.com/matteodem/vue-apollo-bug

Simply go once into code/api and code/web-app and do following for each folder:

npm install
npm run dev

Both apps need to be running. The api app is the graphql endpoint and the web-app just a webpack project with vuejs. I get following error when visiting the web app url:

error

from apollo.

matteodem avatar matteodem commented on April 27, 2024

any success?

from apollo.

Akryum avatar Akryum commented on April 27, 2024

from apollo.

matteodem avatar matteodem commented on April 27, 2024

sure, sorry to stress you

from apollo.

Akryum avatar Akryum commented on April 27, 2024

I've tried the app, with the same error. In one of my project with apollo-server, the client makes 2 requests with the OPTIONS method. But the meteor package rejects it, so I wonder if its internal apollo packages are up-to-date.

from apollo.

Akryum avatar Akryum commented on April 27, 2024

@matteodem Did you try setting up apollo server manually?

from apollo.

matteodem avatar matteodem commented on April 27, 2024

no, do you have an example of doing that with meteorjs?

from apollo.

Akryum avatar Akryum commented on April 27, 2024

You can get inspiration from this or maybe try to clone the meteor/apollo package and update the dependencies.

from apollo.

ecerroni avatar ecerroni commented on April 27, 2024

Just for reference I had the very same problem although I'm not using meteor. Indeed I'm using the classic vue webpack dev server and an express apollo server.

I solved my problem thanks to this post. I hope it'll help others too facing the same issue:
https://forums.meteor.com/t/solved-cors-errors-with-apollo-on-meteor-1-4x/29465

from apollo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.