{"action":"created","issue":{"url":"https://api.github.com/repos/ckimes89/graphql-net/issues/51","repository_url":"https://api.github.com/repos/ckimes89/graphql-net","labels_url":"https://api.github.com/repos/ckimes89/graphql-net/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/ckimes89/graphql-net/issues/51/comments","events_url":"https://api.github.com/repos/ckimes89/graphql-net/issues/51/events","html_url":"https://github.com/ckimes89/graphql-net/issues/51","id":181555291,"number":51,"title":"Help debugging \"Unsupported CLR type\" exceptions","user":{"login":"markhepburn","id":56747,"avatar_url":"https://avatars.githubusercontent.com/u/56747?v=3","gravatar_id":"","url":"https://api.github.com/users/markhepburn","html_url":"https://github.com/markhepburn","followers_url":"https://api.github.com/users/markhepburn/followers","following_url":"https://api.github.com/users/markhepburn/following{/other_user}","gists_url":"https://api.github.com/users/markhepburn/gists{/gist_id}","starred_url":"https://api.github.com/users/markhepburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markhepburn/subscriptions","organizations_url":"https://api.github.com/users/markhepburn/orgs","repos_url":"https://api.github.com/users/markhepburn/repos","events_url":"https://api.github.com/users/markhepburn/events{/privacy}","received_events_url":"https://api.github.com/users/markhepburn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-07T00:10:34Z","updated_at":"2016-12-10T01:52:08Z","closed_at":"2016-10-10T02:32:19Z","body":"I've moved on to testing using a model from an existing project.  This is a code-first model, originally reverse-engineered from the database, if that's relevant.  I was able to successfully run queries if I manually added some fields (ie calling `GraphQLTypeBuilder.AddField()`), but given that we have a fair few models and they're quite large, this isn't ideal.\n\nHowever, I've encountered issues running a basic example using `AddAllFields()`:\n\n``` csharp\nvar schema = GraphQL<EQContext>.CreateDefaultSchema(() => new EQContext());\nschema.AddScalar(new { year = 0, month = 0, day = 0 }, ymd => new DateTime(ymd.year, ymd.month, ymd.day));\nschema.AddType<EQ>().AddAllFields();\nschema.AddField(\"eq\", new { id = \"\" }, (db, args) => db.EQs.FirstOrDefault(e => e.EQ_ID == args.id));\nschema.Complete();\n```\n\nSpecifically, `ExecuteQuery` is throwing `GraphQL.Parser.ValidationException: Unsupported CLR type EQ`.\n\nThe `EQ` model is mostly `string`, `decimal`, and nullable `DateTime` fields, along with a bunch of references to other models.  Any suggestions for what could be causing this, or how to debug it?\n\nThings I've tried:\n- Adding recursive fields to models in the test suite (for example, in `User` I added a `Supervisor`/`DirectReports` many-one pair of fields), to test if that was an issue\n- Adding every other model referenced from the model in question (ie, everything in the context) to the schema\n- Ensuring that `DateTime` has been added via `schema.AddScalar()`\n\nI'll move on now, but I'd like to add that this is a super promising project, and I'm happy to help out if I can.\n"},"comment":{"url":"https://api.github.com/repos/ckimes89/graphql-net/issues/comments/266170184","html_url":"https://github.com/ckimes89/graphql-net/issues/51#issuecomment-266170184","issue_url":"https://api.github.com/repos/ckimes89/graphql-net/issues/51","id":266170184,"user":{"login":"harrisse","id":3307401,"avatar_url":"https://avatars.githubusercontent.com/u/3307401?v=3","gravatar_id":"","url":"https://api.github.com/users/harrisse","html_url":"https://github.com/harrisse","followers_url":"https://api.github.com/users/harrisse/followers","following_url":"https://api.github.com/users/harrisse/following{/other_user}","gists_url":"https://api.github.com/users/harrisse/gists{/gist_id}","starred_url":"https://api.github.com/users/harrisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harrisse/subscriptions","organizations_url":"https://api.github.com/users/harrisse/orgs","repos_url":"https://api.github.com/users/harrisse/repos","events_url":"https://api.github.com/users/harrisse/events{/privacy}","received_events_url":"https://api.github.com/users/harrisse/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T01:52:08Z","updated_at":"2016-12-10T01:52:08Z","body":"Thanks for the quick response. I'm having a hard time reproducing the issue in your test project, so please don't worry about the issue for now, and I'll let you know if I can get a more reproducible test case."}}
{"actor":{"display_login":"harrisse"}}