Not authorised when trying to use forwardTo



I have the following code for my graphql query

export const Query = prismaObjectType("Query", t => {

  t.field("fonts", "Font", {
    list: true,
    resolve: (parent, args, ctx, info) => {
      return forwardTo("prisma")(parent, args, ctx, info);
      // console.log("Resovle fonts", ctx);
      // const result = ctx.prisma.fonts();
      // result.then(val => console.log(val));
      // return ctx.prisma.fonts();

However when I try to query the fonts endpoint I get a response of ‘Not Authorised!’. I removed my secret key for local development and still get the same issue. What am I doing wrong here?



Looks like you are using prisma nexus but you are using the API wrongly(it is understandable as it WIP and we don’t have any docs for it). We don’t provide forwardTo in nexus-prisma but we have a new API for exposing fields.

You can have a look here:


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.