Skip to content

How to manually initialise the server with GraphQL #5761

@omairvaiyani

Description

@omairvaiyani

We use Parse Server as a middleware in our express app - we're able to do this alongside manually setting the up the live query server like so:

const app = express();
const parseServer = new ParseServer({ ...serverConfig });
this.setRoute('', parseServer);

// ... other routes
// start the http server
const httpServer = http.createServer(app);
httpServer.listen(port, () => {
      console.log(`Server listening at ${this.serverUrl} in ${nodeEnv}.`);
});

// start the live query server
ParseServer.createLiveQueryServer(httpServer, { ...liveQueryServerConfig });

Our parse server config:

{
    // ... other stuff,

    mountGraphQL: true,
    mountPlayground: true

}

This does not seem to start the graphql server on its own. Digging into the source code, I can see a ParseServer instance method called start - which does not get called in the above manner. Is there a more appropriate / modern way to initialise the server that the docs are not caught up with?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions