Skip to content

Help with subscribe arguments #289

Answered by hayes
ricardo-valero asked this question in Q&A
Discussion options

You must be logged in to vote

I suspect the issue is with how you are executing your query, or how the server is parsing/passing arguments. The following works for me, but if you have a more complete example, including how you are executing your subscription that might help.

import SchemaBuilder from "@pothos/core";
import { subscribe } from "graphql";
import gql from "graphql-tag";

const builder = new SchemaBuilder<{ DefaultInputFieldRequiredness: true }>({
  defaultInputFieldRequiredness: true,
});
type RandomIntInput = {
  min: number;
  max: number;
  qty: number;
};

const RandomIntInputObject = builder.inputRef<RandomIntInput>("RandomIntInput");

RandomIntInputObject.implement({
  fields: (t) => ({
    min: t.int(

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ricardo-valero
Comment options

@ricardo-valero
Comment options

Answer selected by ricardo-valero
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants