Giter VIP home page Giter VIP logo

Comments (3)

dmitshur avatar dmitshur commented on July 28, 2024

A related problem happened in shurcooL/githubv4#55.

The problem was that the query was Repo []struct {...} but should've been Repo struct {...}. The error was "struct field for "name" doesn't exist in any of 1 places to unmarshal".

In this case, it doesn't seem that an alternative behavior would be viable, so a more detailed and helpful error message would be better. Need to investigate whether it is viable.

from graphql.

davidkarlsen avatar davidkarlsen commented on July 28, 2024

Hmm, I have this query:

var query struct {
		Organization struct {
			SamlIdentityProvider struct {
				ExternalIdentities struct {
					PageInfo struct {
						hasNextPage githubv4.Boolean
						endCursor   githubv4.String
					} `graphql:"pageInfo"`
					Edges []struct {
						Node struct {
							SamlIdentity struct {
								NameId   githubv4.String
								Username githubv4.String
							} `graphql:"samlIdentity"`
							User struct {
								Login githubv4.String
							} `graphql:"user"`
						} `graphql:"node"`
					} `graphql:"edges"`
				} `graphql:"externalIdentities(first: $first, after: $after)"`
			} `graphql:"samlIdentityProvider"`
		} `graphql:"organization(login: $login)"`
	}

which should match the returned structure just fine, but still it won't work?

from graphql.

davidkarlsen avatar davidkarlsen commented on July 28, 2024

doh, amateur-hour, I hadn't exported them. Disregard my comment.

from graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.