-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: add custom transformer docs #992
Conversation
If it helps, I just released a simple https://github.com/hisham/graphql-lowercase-transformer DynamoDB does not support case insensitive string search, so this transformer forces searchable strings to be in lowercase in the backend (see aws-amplify/amplify-cli#526). |
I also had the following feedback when building this transformer. I followed your documentation plus the VersionedModelTransformer as my example but ran into the following issues:
|
Also graphql transformers to be looked up via npm registry need to be installed globally or else you'll get i.e. This wasn't immediately clear to me. |
@hisham: same thing for me, will be great to have these docs mentioning this.
@hisham: hm strange, you are using globally installed amplify right? I wonder if this changes if you use amplify as local project dependency Can you also run: to check the paths that node looks up when resolving modules. |
@ambientlight yes I am using globally installed amplify. If amplify was installed locally I think it would look it it up locally. Looks like @attilah recently did a PR offering option for both globally installed and locally installed custom transformer packages, see aws-amplify/amplify-cli#2814 |
@hisham @ambientlight Yes, I changed the loading a bit, it has issues about location and initialization as you also faced, I even enabled the pojo scenario, a single object with a method on it and a required properties to work. I've more ideas around it that will come in future changes. |
Outdated. Closing |
Description of changes:
Adding a paragraph about custom GraphQL transformer registration.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.