
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
graphql-models_connect
Advanced tools
A way to directly link GraphQL types with their underlying models.
Add this line to your application's Gemfile:
gem 'graphql-models_connect', '~> 1.0'
And then execute:
$ bundle
GraphQL Models Connect associates every GraphQL type with a model. By default, the model is assumed to have the same name as the type minus the Type
suffix, and to be nested under the same module. For a single exception you can explicitly declare the model inside your object type:
module Types
class PokemonType < BaseObject
model_class Pokemon
...
end
end
To change the default behavior of the gem, override the default_model_class
class method in your base object class:
module Types
class BaseObject < GraphQL::Schema::Object
def self.default_model_class
model_name = name
.delete_prefix('Types::')
.delete_suffix('Type')
const_get model_name
end
end
end
The same methods are defined for interfaces.
GraphQL Models Connect loosely follows Semantic Versioning, with a hard guarantee that breaking changes to the public API will always coincide with an increase to the MAJOR
number.
Version numbers are in three parts: MAJOR.MINOR.PATCH
.
MAJOR
. There may also be changes that would otherwise increase the MINOR
or the PATCH
.MINOR
. There may also be changes that would otherwise increase the PATCH
.PATCH
.Notice that any feature deprecated by a minor release can be expected to be removed by the next major release.
Full list of changes in CHANGELOG.md
Bug reports and pull requests are welcome on GitHub at https://github.com/moku-io/graphql-filters.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that graphql-models_connect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.