{"action":"opened","number":183,"pull_request":{"url":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183","id":235172041,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MTcyMDQx","html_url":"https://github.com/masumsoft/express-cassandra/pull/183","diff_url":"https://github.com/masumsoft/express-cassandra/pull/183.diff","patch_url":"https://github.com/masumsoft/express-cassandra/pull/183.patch","issue_url":"https://api.github.com/repos/masumsoft/express-cassandra/issues/183","number":183,"state":"open","locked":false,"title":"Fixed the fieldObject.type reference with fieldtype in validate_field().","user":{"login":"AlexisWilke","id":1028617,"node_id":"MDQ6VXNlcjEwMjg2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1028617?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexisWilke","html_url":"https://github.com/AlexisWilke","followers_url":"https://api.github.com/users/AlexisWilke/followers","following_url":"https://api.github.com/users/AlexisWilke/following{/other_user}","gists_url":"https://api.github.com/users/AlexisWilke/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexisWilke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexisWilke/subscriptions","organizations_url":"https://api.github.com/users/AlexisWilke/orgs","repos_url":"https://api.github.com/users/AlexisWilke/repos","events_url":"https://api.github.com/users/AlexisWilke/events{/privacy}","received_events_url":"https://api.github.com/users/AlexisWilke/received_events","type":"User","site_admin":false},"body":"I decided to try to create a Pull request, So I'll close #182\r\n\r\nI'm starting with express-cassandra and I got the following error\r\n\r\n> (node:13187) UnhandledPromiseRejectionWarning: apollo.model.validator.invalidschema: Invalid field type \"undefined\" for field: content_id\r\n\r\nLooking at the code I see that the type can either be a field or a string;\r\n\r\n    get_field_type(modelSchema, fieldName) {\r\n      var fieldObject = modelSchema.fields[fieldName];\r\n\r\n      if (typeof fieldObject === 'string') {\r\n        return fieldObject;\r\n      }\r\n      if (_.isPlainObject(fieldObject)) {\r\n        return fieldObject.type;\r\n      }\r\n      throw new Error('Field type not defined properly');\r\n    },\r\n\r\nHowever, in the code generating the error:\r\n\r\n    var fieldtype = this.get_field_type(modelSchema, fieldName);\r\n    if (!_.has(datatypes, fieldtype)) {\r\n      throw new Error(util.format('Invalid field type \"%s\" for field: %s', fieldObject.type, fieldName));\r\n    }\r\n\r\nI suggest changing the `fieldObject.type` with `fieldtype` as follow:\r\n\r\n      throw new Error(util.format('Invalid field type \"%s\" for field: %s', fieldtype, fieldName));\r\n\r\nThen I can see that it's not happen with 'long' as a field type:\r\n\r\n> (node:13187) UnhandledPromiseRejectionWarning: apollo.model.validator.invalidschema: Invalid field type \"long\" for field: content_id\r\n\r\nWhich is strange, but at least makes a lot more sense.","created_at":"2018-12-01T05:30:21Z","updated_at":"2018-12-01T05:30:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183/commits","review_comments_url":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183/comments","review_comment_url":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/masumsoft/express-cassandra/issues/183/comments","statuses_url":"https://api.github.com/repos/masumsoft/express-cassandra/statuses/12bfb135f85d38775d2be376a26705934f947cb5","head":{"label":"AlexisWilke:master","ref":"master","sha":"12bfb135f85d38775d2be376a26705934f947cb5","user":{"login":"AlexisWilke","id":1028617,"node_id":"MDQ6VXNlcjEwMjg2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1028617?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexisWilke","html_url":"https://github.com/AlexisWilke","followers_url":"https://api.github.com/users/AlexisWilke/followers","following_url":"https://api.github.com/users/AlexisWilke/following{/other_user}","gists_url":"https://api.github.com/users/AlexisWilke/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexisWilke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexisWilke/subscriptions","organizations_url":"https://api.github.com/users/AlexisWilke/orgs","repos_url":"https://api.github.com/users/AlexisWilke/repos","events_url":"https://api.github.com/users/AlexisWilke/events{/privacy}","received_events_url":"https://api.github.com/users/AlexisWilke/received_events","type":"User","site_admin":false},"repo":{"id":159911804,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk5MTE4MDQ=","name":"express-cassandra","full_name":"AlexisWilke/express-cassandra","private":false,"owner":{"login":"AlexisWilke","id":1028617,"node_id":"MDQ6VXNlcjEwMjg2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1028617?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexisWilke","html_url":"https://github.com/AlexisWilke","followers_url":"https://api.github.com/users/AlexisWilke/followers","following_url":"https://api.github.com/users/AlexisWilke/following{/other_user}","gists_url":"https://api.github.com/users/AlexisWilke/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexisWilke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexisWilke/subscriptions","organizations_url":"https://api.github.com/users/AlexisWilke/orgs","repos_url":"https://api.github.com/users/AlexisWilke/repos","events_url":"https://api.github.com/users/AlexisWilke/events{/privacy}","received_events_url":"https://api.github.com/users/AlexisWilke/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AlexisWilke/express-cassandra","description":"Cassandra ORM/ODM/OGM for Node.js with optional support for Elassandra & JanusGraph","fork":true,"url":"https://api.github.com/repos/AlexisWilke/express-cassandra","forks_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/forks","keys_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/teams","hooks_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/hooks","issue_events_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/events","assignees_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/tags","blobs_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/languages","stargazers_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/stargazers","contributors_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/contributors","subscribers_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/subscribers","subscription_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/subscription","commits_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/merges","archive_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/downloads","issues_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/labels{/name}","releases_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/releases{/id}","deployments_url":"https://api.github.com/repos/AlexisWilke/express-cassandra/deployments","created_at":"2018-12-01T05:20:30Z","updated_at":"2018-12-01T05:26:46Z","pushed_at":"2018-12-01T05:26:45Z","git_url":"git://github.com/AlexisWilke/express-cassandra.git","ssh_url":"git@github.com:AlexisWilke/express-cassandra.git","clone_url":"https://github.com/AlexisWilke/express-cassandra.git","svn_url":"https://github.com/AlexisWilke/express-cassandra","homepage":"http://express-cassandra.readthedocs.io","size":762,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"masumsoft:master","ref":"master","sha":"36b5bd2364eaea35f3588f75a9233647c9408613","user":{"login":"masumsoft","id":1887201,"node_id":"MDQ6VXNlcjE4ODcyMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1887201?v=4","gravatar_id":"","url":"https://api.github.com/users/masumsoft","html_url":"https://github.com/masumsoft","followers_url":"https://api.github.com/users/masumsoft/followers","following_url":"https://api.github.com/users/masumsoft/following{/other_user}","gists_url":"https://api.github.com/users/masumsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/masumsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masumsoft/subscriptions","organizations_url":"https://api.github.com/users/masumsoft/orgs","repos_url":"https://api.github.com/users/masumsoft/repos","events_url":"https://api.github.com/users/masumsoft/events{/privacy}","received_events_url":"https://api.github.com/users/masumsoft/received_events","type":"User","site_admin":false},"repo":{"id":36463647,"node_id":"MDEwOlJlcG9zaXRvcnkzNjQ2MzY0Nw==","name":"express-cassandra","full_name":"masumsoft/express-cassandra","private":false,"owner":{"login":"masumsoft","id":1887201,"node_id":"MDQ6VXNlcjE4ODcyMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/1887201?v=4","gravatar_id":"","url":"https://api.github.com/users/masumsoft","html_url":"https://github.com/masumsoft","followers_url":"https://api.github.com/users/masumsoft/followers","following_url":"https://api.github.com/users/masumsoft/following{/other_user}","gists_url":"https://api.github.com/users/masumsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/masumsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masumsoft/subscriptions","organizations_url":"https://api.github.com/users/masumsoft/orgs","repos_url":"https://api.github.com/users/masumsoft/repos","events_url":"https://api.github.com/users/masumsoft/events{/privacy}","received_events_url":"https://api.github.com/users/masumsoft/received_events","type":"User","site_admin":false},"html_url":"https://github.com/masumsoft/express-cassandra","description":"Cassandra ORM/ODM/OGM for Node.js with optional support for Elassandra & JanusGraph","fork":false,"url":"https://api.github.com/repos/masumsoft/express-cassandra","forks_url":"https://api.github.com/repos/masumsoft/express-cassandra/forks","keys_url":"https://api.github.com/repos/masumsoft/express-cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/masumsoft/express-cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/masumsoft/express-cassandra/teams","hooks_url":"https://api.github.com/repos/masumsoft/express-cassandra/hooks","issue_events_url":"https://api.github.com/repos/masumsoft/express-cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/masumsoft/express-cassandra/events","assignees_url":"https://api.github.com/repos/masumsoft/express-cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/masumsoft/express-cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/masumsoft/express-cassandra/tags","blobs_url":"https://api.github.com/repos/masumsoft/express-cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/masumsoft/express-cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/masumsoft/express-cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/masumsoft/express-cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/masumsoft/express-cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/masumsoft/express-cassandra/languages","stargazers_url":"https://api.github.com/repos/masumsoft/express-cassandra/stargazers","contributors_url":"https://api.github.com/repos/masumsoft/express-cassandra/contributors","subscribers_url":"https://api.github.com/repos/masumsoft/express-cassandra/subscribers","subscription_url":"https://api.github.com/repos/masumsoft/express-cassandra/subscription","commits_url":"https://api.github.com/repos/masumsoft/express-cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/masumsoft/express-cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/masumsoft/express-cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/masumsoft/express-cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/masumsoft/express-cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/masumsoft/express-cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/masumsoft/express-cassandra/merges","archive_url":"https://api.github.com/repos/masumsoft/express-cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/masumsoft/express-cassandra/downloads","issues_url":"https://api.github.com/repos/masumsoft/express-cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/masumsoft/express-cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/masumsoft/express-cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/masumsoft/express-cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/masumsoft/express-cassandra/labels{/name}","releases_url":"https://api.github.com/repos/masumsoft/express-cassandra/releases{/id}","deployments_url":"https://api.github.com/repos/masumsoft/express-cassandra/deployments","created_at":"2015-05-28T20:15:40Z","updated_at":"2018-11-29T00:16:48Z","pushed_at":"2018-07-10T06:16:36Z","git_url":"git://github.com/masumsoft/express-cassandra.git","ssh_url":"git@github.com:masumsoft/express-cassandra.git","clone_url":"https://github.com/masumsoft/express-cassandra.git","svn_url":"https://github.com/masumsoft/express-cassandra","homepage":"http://express-cassandra.readthedocs.io","size":762,"stargazers_count":114,"watchers_count":114,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":39,"open_issues":17,"watchers":114,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183"},"html":{"href":"https://github.com/masumsoft/express-cassandra/pull/183"},"issue":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/issues/183"},"comments":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/issues/183/comments"},"review_comments":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183/comments"},"review_comment":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/pulls/183/commits"},"statuses":{"href":"https://api.github.com/repos/masumsoft/express-cassandra/statuses/12bfb135f85d38775d2be376a26705934f947cb5"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":5,"deletions":5,"changed_files":1}}
{"actor":{"display_login":"AlexisWilke"}}