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

Attribute text not support in generator #82

Open
masterT opened this issue Apr 22, 2022 · 1 comment · May be fixed by #83
Open

Attribute text not support in generator #82

masterT opened this issue Apr 22, 2022 · 1 comment · May be fixed by #83

Comments

@masterT
Copy link

masterT commented Apr 22, 2022

Schema Information for model Post:

# == Schema Information
#
# Table name: posts
#
#  id         :uuid             not null, primary key
#  content    :text             not null
#  created_at :datetime         not null
#  updated_at :datetime         not null
#  user_id    :uuid             not null
#
# Indexes
#
#  index_posts_on_user_id  (user_id)
#
# Foreign Keys
#
#  fk_rails_...  (user_id => users.id)
#

Command

bin/rails generate graphiti:resource Post --model=Post --rawid

Output

Could not find type :text! This was specified on attribute :content within resource PostResource (Graphiti::Errors::TypeNotFound)

Valid types are: [:integer_id, :uuid, :string_enum, :integer_enum, :string, :integer, :big_decimal, :float, :boolean, :date, :datetime, :hash, :array, :array_of_integer_ids, :array_of_uuids, :array_of_string_enums, :array_of_integer_enums, :array_of_strings, :array_of_integers, :array_of_big_decimals, :array_of_floats, :array_of_dates, :array_of_datetimes]
@masterT
Copy link
Author

masterT commented Apr 22, 2022

I think the generator should map the Rails column type to Graphiti attribute type.

@masterT masterT linked a pull request Apr 22, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant