Skip to content

Instantly share code, notes, and snippets.

@jjenzz
Last active June 23, 2018 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjenzz/1ed649d3be9a59d262dc2d8bb06b9e58 to your computer and use it in GitHub Desktop.
Save jjenzz/1ed649d3be9a59d262dc2d8bb06b9e58 to your computer and use it in GitHub Desktop.
I can't seem to figure out where I'm going wrong here. Querying `stats` returns `null` and the resolvers aren't called. Whyyyy? 🙈https://launchpad.graphql.com/w5q78w4zrz
const typeDefs = `
schema {
query: Query
}
type Query {
stats: Stats
}
type Stats {
totalPlays: Int!
totalReleases: Int!
}
`;
module.exports.schema = makeExecutableSchema({
typeDefs,
resolvers: {
Stats: {
totalPlays: () => fetch(/* ... */),
totalReleases: () => fetch(/* ... */),
},
},
});
@jjenzz
Copy link
Author

jjenzz commented Jun 23, 2018

Sods law. I ask for help and then figure it out: https://launchpad.graphql.com/4r70zwlvn9

That Query resolver seems so redundant but it works so I can sleep easy tonight 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment