Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic from generate #40

Closed
buchanae opened this issue Mar 7, 2018 · 1 comment
Closed

panic from generate #40

buchanae opened this issue Mar 7, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@buchanae
Copy link

buchanae commented Mar 7, 2018

gqlgen -out generated.go -package graphql
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x121635f]

goroutine 1 [running]:
github.com/vektah/gqlgen/codegen.Bind(0xc420116af0, 0xc420140bd0, 0xc424bb6280, 0x3b, 0x1, 0xc4230de660, 0xb)
	/Users/buchanae/src/github.com/vektah/gqlgen/codegen/build.go:87 +0x45f
main.main()
	/Users/buchanae/src/github.com/vektah/gqlgen/main.go:75 +0x3d6

schema

scalar Time

type Workflow {
  id: ID!
  inputs: [WorkflowInput!]!
  outputs: [WorkflowOutput!]!
  steps: [Step!]!
  runs: [WorkflowRun!]!
}

type WorkflowInput {
  id :ID!
}

type WorkflowOutput {
  id :ID!
}

type Step {
  id :ID!
  name: String!
  inputs: [StepInput!]!
  outputs: [StepOutput!]!
  order: Int!
  workflow: Workflow!
}

type StepInput {
  id :ID!
}

type StepOutput {
  id :ID!
}

enum RunState {
  Complete
  Running
  Error
  Idle
}

type WorkflowRun {
  id :ID!
  total: Int!
  idle: Int!
  running: Int!
  error: Int!
  complete: Int!

  state: RunState!
  done: Boolean!

  startTime: Time
  endTime: Time

  workflow: Workflow!
  stepRuns: [StepRun!]!
}

type StepRun {
  id :ID!

  state: RunState!
  task: Task!
  step: Step!
}

enum TaskState {
  Unknown
  Queued
  Initializing
  Running
  ExecutorError
  SystemError
  Complete
}

type Task {
  id :ID!
  state: TaskState!
}
@buchanae
Copy link
Author

buchanae commented Mar 7, 2018

I was missing the schema and type Query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants