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

qlooctl doesn't return schema from petstore example #3

Closed
texascloud opened this issue Jul 31, 2018 · 5 comments
Closed

qlooctl doesn't return schema from petstore example #3

texascloud opened this issue Jul 31, 2018 · 5 comments

Comments

@texascloud
Copy link

# The query type, represents all of the entry points into our object graph
type Query {
    pets: [Pet]
    pet(id: Int!): Pet
}

type Mutation {
    addPet(pet: InputPet!): Pet
}

type Pet{
    id: ID!
    name: String!
    status: Status!
}

input InputPet{
    id: ID!
    name: String!
    tag: String
}

enum Status {
    pending
    available
}

I put the above schema into a file called petstore.graphql then uploaded it via qlooctl as per the petstore k8s example.

> qlooctl schema create petstore -f ./petstore.graphql
> qlooctl schema get petstore
petstore%

What I expected was to see the schema I had just uploaded. I also tried uploading the schema in the manner the help text of qlooctl described:
qlooctl schema create petstore --from-file ./petstore.graphql

Same error

@texascloud
Copy link
Author

I also tried creating the schema in the way it's created in demo.sh of the petstore dir:
qlooctl schema create -f ./petstore.graphql petstore

That also yielded same error

@texascloud
Copy link
Author

Specifying -o yaml gives expected results:

> qlooctl schema get petstore -o yaml
inline_schema: |
  # The query type, represents all of the entry points into our object graph
  type Query {
      pets: [Pet]
      pet(id: Int!): Pet
  }

  type Mutation {
      addPet(pet: InputPet!): Pet
  }

  type Pet{
      id: ID!
      name: String!
      status: Status!
  }

  input InputPet{
      id: ID!
      name: String!
      tag: String
  }

  enum Status {
      pending
      available
  }
metadata:
  namespace: gloo-system
  resource_version: "2353949"
name: petstore
resolver_map: petstore-resolvers
status:
  state: Accepted

@ilackarms
Copy link
Member

does this mean the issue is resolved? I don't see that you posted any error

@texascloud
Copy link
Author

I closed the issue because I was interpreting the default behavior as an error. The "error" was that I expected the schema to print out whereas I just got the name of the schema

@ilackarms
Copy link
Member

qlooctl ... -o yaml will print the content of the schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants