![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@gramps/data-source-numbers
Advanced tools
A boilerplate and minimal example for a GrAMPS data source.
Set up a local data source in seconds with:
# 💥 zero dependencies! no global installs! create a new data source
npx graphql-cli create -b gramps-graphql/data-source-base data-source-mydata
# 📂 move into the newly-created data source
cd $_
# 🚀 start the GraphQL Playground with your spankin’ new data source
yarn dev
NOTE: We recommend prefixing data source projects with
data-source-
for clarity and the eventual support of CLI tools to add data sources to your gateway. So if you’re creating a user management data source for the Acme company, we recommenddata-source-acme-users
ordata-source-acmeusers
as a directory/repo name.
ALSO NOTE:
$_
is a handy shortcut for using the last argument passed to the previous command. It also does other stuff, but that's a rabbit hole for another time.
After running yarn dev
, you’ll see a message with URLs for the GraphQL gateway and the GraphQL Playground. Open the Playground link (usually http://localhost:8080/playground if you don’t already have something running on port 8080), then run a query:
{
getById(id: 123) {
id
name
lucky_numbers
}
}
Add the --mock
flag to enable mock data, which is helpful for working offline.
# Start the gateway with mock data
yarn dev --mock
See src/mocks.js
to modify your mock resolvers.
NOTE: For more information on the GrAMPS CLI and its available options, check out the docs.
GrAMPS data sources start you off with 100% test coverage so you can build high-reliability GraphQL servers without a bunch of setup work.
Run the tests with:
yarn test
Inside, you’ll find:
Each file contains a TODO
comment explaining the changes you’ll need to make to create a working data source.
The goal of this repo is to provide enough code to allow a working example of a data source and its related tests, but to limit how much boilerplate needs to be edited to get your own data source implemented.
To help ensure a reliable, easy-to-maintain data source, this example also includes:
Currently, there is no watch capability (PRs welcome!), so the service needs to be stopped (control
+ C
) and restarted (yarn dev
) to reflect new changes to the data source.
FAQs
GrAMPS GraphQL Data Source for Numbers API
The npm package @gramps/data-source-numbers receives a total of 0 weekly downloads. As such, @gramps/data-source-numbers popularity was classified as not popular.
We found that @gramps/data-source-numbers 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.