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

Nullable fields not being handled correctly. #105

Open
sdost opened this issue Mar 23, 2020 · 0 comments
Open

Nullable fields not being handled correctly. #105

sdost opened this issue Mar 23, 2020 · 0 comments

Comments

@sdost
Copy link

sdost commented Mar 23, 2020

In our MySQL table the enum field is nullable by default. When the nil is received from a query, it is passed into the load/1 function, which is only expecting the values of the enum, and does not handle a nil value.

Request: POST /graphql
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in BusinessType.load/1
        (emporos) lib/emporos/models/stripe/business_type.ex:3: BusinessType.load(nil)

I would expect that the nil should just get passed through to nil from the load/1 function.

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

1 participant