
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Easy to use GraphQL client for front-end development.
Installing with npm:
npm install --save ez-ql
yarn:
yarn add ez-ql
import Ez from 'ez-ql'
After installing and importing the package, there are only two simple calls that need to be used for full functionality after instantiating a new Ez
object...
const ez = new Ez({
uri: 'http://127.0.0.1:8080/graphql', // The url|uri of the target API
headers: {
'Content-Type': 'application/json'
}
})
The options object passed to the constructor looks for two properties, the url|uri
and a headers
object. Creating additional headers is optional and if disregarded will default to 'Content-Type': 'application/json'
as the sole header. If the url|uri
property in the constructor options is just set, it defaults to http://localhost:8080/graphql
.
The first of the two calls is the ES6 template string literal tag ql
...
ez.ql`
{
lot(number: 5) {
totalSpaces
permits
closed
}
}
`.then(...).catch(...)
Its alternative for when you have a pre-build string that represents your GraphQL query, there is a non-literal-tag function that can be used.
const query = `
{
lot(number: 5) {
totalSpaces
permits
closed
}
}
`
ez.pql(query)
.then(...)
.catch(...)
Both ql
and pql
returns promises to be handled as needed.
MIT License
Copyright (c) 2017 Matthew Callens
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Easy to use GraphQL front-end client.
We found that ez-ql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.