I am following the tutorial from https://www.howtographql.com/graphql-ruby/4-authentication/
I get the following error while trying to create a mutation to create new Users;
NameError (uninitialized constant Types::AuthProviderEmailInput):
app/graphql/resolvers/create_user.rb:5:in `block in <class:CreateUser>'
app/graphql/graph_ql_ruby_schema.rb:1:in `<top (required)>'app/controllers/graphql_controller.rb:10:in `execute'
@EAdeveloper Please correct the file name to be auth_provider_email_input.rb
in ..app/graphql/types/auth_provider_email_input.rb
Types::AuthProviderEmailInput = GraphQL::InputObjectType.define do
name 'AUTH_PROVIDER_EMAIL'
argument :email, !types.String
argument :password, !types.String
end
Hi! I hoped that helped for you. Sorry, I don't know that tutorial so I can't support it here. You might try the howtographql repository instead: https://github.com/howtographql/howtographql
hello can you please explain why !types.String no more work , when i made this commande "rails g graphql:object user title:string etc" it generate file with Types::StringType instead of !types.String
thank you :)
Most helpful comment
@EAdeveloper Please correct the file name to be
auth_provider_email_input.rbin ..app/graphql/types/auth_provider_email_input.rb