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

Graphql schema missing definitions #124

Open
magick93 opened this issue Feb 25, 2022 · 3 comments
Open

Graphql schema missing definitions #124

magick93 opened this issue Feb 25, 2022 · 3 comments

Comments

@magick93
Copy link

Hi

Bug

The graphql schema does not include all used definitions. For example, using the Profile schemata, the graphql type does not contain social_accounts.

type Profile {
  #
  age: Int

  #
  body: String

  #
  company: String

  #
  first_name: String!

  #
  id: String!

  #
  image: String

  #
  last_name: String!

  #
  title: String
}

I'm using the following schemata (copied from the dogfood folder):

{
	_schema: {
		name:      "Profile"
		namespace: "schemas.cueblox.com"
	}

	#Profile: {
		_dataset: {
			plural: "profiles"
			supportedExtensions: ["yaml", "yml", "md", "mdx"]
		}

		first_name: string @template("Forename")
		last_name:  string @template("Surname")
		age?:       int    @template(21)
		company?:   string @template("CueBlox")
		title?:     string @template("Cue Slinger")
		body?:      string @template("Required")
		image?:  string
		social_accounts?: [...#TwitterAccount | #GitHubAccount | #MiscellaneousAccount]
	}

	#TwitterAccount: {
		network:  "twitter"
		username: string @template("twitter-handle")
		url:      *"https://twitter.com/\(username)" | string
	}

	#GitHubAccount: {
		network:  "github"
		username: string @template("github-handle")
		url:      *"https://github.com/\(username)" | string
	}

	#MiscellaneousAccount: {
		network: string @template("some_network")
		url:     string @template("https://some_url")
	}
}
@rawkode
Copy link
Collaborator

rawkode commented Mar 2, 2022

There's definitely a few things omitted when running blox serve

Unfortunately, I've not found a way with the CUE API to get the IncompleteKind for a disjunction like this.

I've reached out to the CUE team for advice

CC @myitcv @mpvl

@myitcv
Copy link

myitcv commented Mar 3, 2022

@rawkode

I've reached out to the CUE team for advice

Please can you clarify what the question to us is here? Or am I missing it in some other channel? Thanks

@rawkode
Copy link
Collaborator

rawkode commented Mar 3, 2022

@myitcv I'll show you this afternoon. We discussed on Slack.

For posterity, I'll add the reproducer to this issue when I'm in the office too.

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

3 participants