« first day  last day (15 days later) » 

12:11 AM
I don't see anything particularly off about your server configuration
I don't suppose you're seeing any errors on the server side when that refetch request fails?
 
Indeed there's no error, at least none that I can see
 
oh wait
you're using apollo-server-express?
 
That must be an old version, it's API doesn't look anything like that anymore
 
Oh really? I didn't write the code myself so maybe that's the problem
(of the server I mean)
 
12:18 AM
Try updating to the latest version and follow the setup instructions here: github.com/apollographql/apollo-server/tree/master/packages/…
you can keep the makeExecutableSchema bit, if you want
and just set up the instance this way: const server = new ApolloServer({ schema })
 
Okay I'm trying to do that
 
I'd give that a shot, might be some weird server bug that's been patched since then
If nothing else, you should upgrade anyway :)
 
You're right! Is npm update enough to update the module?
 
should be
 
I updated it and changed the code to the following:

import bodyParser from 'body-parser';
import path from 'path'
import fs from 'fs'
import cors from 'cors'
import resolvers from './resolvers'

const express = require('express');
const { ApolloServer, gql } = require('apollo-server-express');

const typeDefs = fs.readFileSync(path.join(__dirname, 'model.graphql'),{encoding:'utf-8'})
const server = new ApolloServer({ typeDefs, resolvers });

const app = express();
server.applyMiddleware({ app });
The problem is still there though
 
12:28 AM
Dang
 
That's really odd that it can work all the time except when doing a refetch in a fetch.then, the error is so random
Something must be preventing the query to arrive at the server
 

« first day  last day (15 days later) »