Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
function introspectionProvider(introspectionQuery) {
// This example expects a GraphQL server at the path /graphql.
// Change this to point wherever you host your GraphQL server.
return fetch('/graphql', {
return fetch('http://localhost:4000/graphql', {
method: 'post',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: introspectionQuery }),
credentials: 'include',
//credentials: 'include',
})
.then(function (response) {
return response.text();
Expand Down
8 changes: 4 additions & 4 deletions example/middleware/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const schema = require('../schema');
const app = express();
const PORT = 3001;

app.use(
'/graphql',
graphqlHTTP(() => ({ schema })),
);
// app.use(
// '/graphql',
// graphqlHTTP(() => ({ schema })),
// );
app.use(
'/voyager',
voyagerMiddleware({
Expand Down
24 changes: 12 additions & 12 deletions example/middleware/hapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ const server = new Hapi.Server({

const init = async () => {
await server.register([
{
plugin: graphqlHapi,
options: {
path: '/graphql',
graphqlOptions: {
schema,
},
route: {
cors: true,
},
},
},
// {
// plugin: graphqlHapi,
// options: {
// path: '/graphql',
// graphqlOptions: {
// schema,
// },
// route: {
// cors: true,
// },
// },
// },
{
plugin: voyagerMiddleware,
options: {
Expand Down
24 changes: 12 additions & 12 deletions example/middleware/hapiLegacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ server.connection({

server.register(
[
{
register: graphqlHapi,
options: {
path: '/graphql',
graphqlOptions: {
schema,
},
route: {
cors: true,
},
},
},
// {
// register: graphqlHapi,
// options: {
// path: '/graphql',
// graphqlOptions: {
// schema,
// },
// route: {
// cors: true,
// },
// },
// },
{
register: voyagerMiddleware,
options: {
Expand Down
Loading