You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add comprehensive README documentation with configuration and examples
- Add tests for nested structures, arrays, and mixed data types
- Add test fixture for complex nested GraphQL responses
- Cover edge cases like empty arrays and nil values
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Kirill Platonov <kirillplatonov@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+113Lines changed: 113 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,119 @@ shop.with_shopify_session do
36
36
end
37
37
```
38
38
39
+
## Configuration
40
+
41
+
### Case Conversion
42
+
43
+
The gem supports automatic case conversion between Ruby's snake_case conventions and GraphQL's camelCase conventions. This feature is disabled by default to maintain backward compatibility.
44
+
45
+
To enable case conversion, configure it in your initializer:
46
+
47
+
```rb
48
+
# config/initializers/shopify_graphql.rb
49
+
ShopifyGraphql.configure do |config|
50
+
config.convert_case =true
51
+
end
52
+
```
53
+
54
+
When enabled, the gem will:
55
+
- Convert snake_case variables to camelCase when sending GraphQL requests
56
+
- Convert camelCase response keys to snake_case for easier access in Ruby
**Note:** Case conversion adds a small performance overhead due to key transformation. Enable it only if you prefer Ruby naming conventions over GraphQL's camelCase.
151
+
39
152
## Conventions
40
153
41
154
To better organize your Graphql code use the following conventions:
0 commit comments