Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

ddp-apollo and Meteor 3.0? #414

Open
EmpowerPeople-Vik opened this issue Jan 14, 2024 · 8 comments
Open

ddp-apollo and Meteor 3.0? #414

EmpowerPeople-Vik opened this issue Jan 14, 2024 · 8 comments

Comments

@EmpowerPeople-Vik
Copy link

Are there plans yet to release an update of ddp-apollo to work with Meteor 3.0?

@saksholm
Copy link

Any progress?

@VikR1000
Copy link

I've gotten ApolloGraphQL working with Meteor 3.0, without Swydo, but it was like 50+ hours of work. I don't know how to write a Meteor package, but I'd be happy to contribute this code to it.

@saksholm
Copy link

I've gotten ApolloGraphQL working with Meteor 3.0, without Swydo, but it was like 50+ hours of work. I don't know how to write a Meteor package, but I'd be happy to contribute this code to it.

So you are not using DDP at all for GraphQL anymore? over HTTPS? was it hard to implement accounts and authentication

@VikR1000
Copy link

It still uses websockets. It was hard to get the Meteor user object into GraphQL context, but I was able to do it partly via code that was part of swydo ddp-apollo.

@jamiter
Copy link
Contributor

jamiter commented Aug 15, 2024

@Cliffzz, if this package is no longer maintained and updated, maybe it's time to publicly archive it? So people know what to expect.

I'm the original author, but no longer work at Swydo nor with Meteor. I do think there is potential in updating this package to make it work with Meteor 3, but I do not plan to do so myself. Maybe someone from the community can fork it and launch it under a new name.

Anyway, cool to see that people are still using this! ❤️

@VikR1000
Copy link

@jamiter, this package was a life-saver for me when I was first adding Apollo to my Meteor app. Thanks for all your great work on it!

@VikR1000
Copy link

VikR1000 commented Aug 19, 2024

@jamiter I've got a question for you. This works fine in development:

const app = express();
const httpServer = http.createServer(app);
const apolloServer = new ApolloServer({
    schema,
    plugins: [
        ApolloServerPluginDrainHttpServer({httpServer}),
        {
            async serverWillStart() {
                return {
                    async drainServer() {
                        await serverCleanUp.dispose();
                    }
                }
            }
        }
    ],
});

But in production, I believe it has to be an https server, rather than an http server.

I've been trying to provision a LetsEncrypt certificate for the httpsServer, using GreenLock, and I'm getting nowhere.

How did you handle this in swydo/ddp-apollo? Can you copy-paste some source code?

Unless...

Can I just run ApolloGraphQL on the same port as Meteor, and listen for calls to the /graphql endpoint this way?

WebApp.handlers.get("/graphql", async (req, res) => {
  [.....]
});

UPDATE

Yes, that's working. :)

@Cliffzz Cliffzz pinned this issue Aug 19, 2024
@Cliffzz
Copy link
Member

Cliffzz commented Aug 19, 2024

@Cliffzz, if this package is no longer maintained and updated, maybe it's time to publicly archive it? So people know what to expect.

Anyway, cool to see that people are still using this! ❤️

Fair enough, will do. We indeed no longer use this nor plan to maintain it.

And even if it could work with Meteor 3.0 I wouldn't recommend to go this route.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants