
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@graphite/server
Advanced tools
Framework NodeJS for GraphQl
GraphiteJS is a NODE.JS Framework for building GraphQL schemas/types fast, easily and with scalability.
npm i @graphite/server --save
yarn add @graphite/server
on your index file:
import { Graphite } from '@graphite/server'
main = async () => {
const graphite = await Graphite()
}
main()
and that's all, you have running the graphqli tool on the port 4000 by default.
After install @graphite/server you have to create your first model. We recommend creating a folder called models and follow the pattern matching the filename with the Type name.
import { GraphQL } from '@graphite/server'
export const Developer = GraphQL('Developer')({
// the value always have to be an array first arg is the type, the second arg is an optional comment
name: ['String!', 'Your name is required'],
age: ['Int'],
isGreatDeveloper: ['Boolean']
})
So, now you need to pass this model to the Graphite Server
on index.js
import { Graphite } from '@graphite/server'
import { Developer } from './models/Developer'
main = async () => {
await Graphite({ models: [Developer] })
}
main()
import { GraphQL } from '@graphite/server'
export const Developer = GraphQL('Developer')({
name: ['String!', 'Your name is required'],
age: ['Int'],
isGreatDeveloper: ['Boolean'],
Query: {
'developer: Developer': () => ({ name: 'Your name' }),
'developers: [Developer]': () => ([{ name: 'Your name' }]),
}
})
import { GraphQL } from '@graphite/server'
export const Developer = GraphQL('Developer')({
name: ['String!', 'Your name is required'],
Mutation: {
'createDeveloper(name: String): Developer': (_, { name, }) => ({ name }),
'updateDeveloper(id: ID!, name: String): Developer': (_, { name }) => ({ name }),
'removeDeveloper(id: ID!): Developer': (_, { name }) => ({ name }),
},
})
import { GraphQL, PubSub } from '@graphite/server'
const pubsub = new PubSub()
const DEVELOPER_ADDED = 'DEVELOPER_ADDED'
export const Developer = GraphQL('Developer')({
name: ['String!', 'Your name is required'],
Mutation: {
'createDeveloper(name: String): Developer': (_, { name, }) => {
pubsub.publish(DEVELOPER_ADDED, { developerAdded: { name } })
return { name }
},
},
Subscription: {
'developerAdded: Developer': {
subscribe: () => pubsub.asyncIterator([DEVELOPER_ADDED]),
},
},
})
// models/Repository.js
const Repository = GraphQL('Repository')({
name: ['String'],
url: ['String'],
})
// models/GithubProfile.js
const GithubProfile = GraphQL('GithubProfile')({
url: ['String'],
})
// models/Developer.js
const Developer = GraphQL('Developer')({
name: ['String'],
'respositories: [Repository]': () => [{ name: 'GraphiteJS', url: 'https://github.com/graphitejs/graphitejs' }],
'githubProfile: GithubProfile': () => ({ url: 'https://github.com/wzalazar' }),
Query: {
'developer: Developer': () => ({ name: 'Walter Zalazar' }),
},
})
So, now you need to pass this model to the Graphite Server
on index.js
import { Graphite } from '@graphite/server'
import { Developer } from './models/Developer'
import { Repository } from './models/Repository'
import { GithubProfile } from './models/GithubProfile'
main = async () => {
await Graphite({ models: [Developer, Repository, GithubProfile] })
}
main()
Please see our contributing.md
npm install
| Walter Zalazar |
| :octocat: @wzalazar |
| :bird: @wzalazar_ |
| Walter Zalazar | José Luis Casella |
| :octocat:@wzalazar | @jl-casella |
| :bird:@wzalazar_ | @jl-casella |
FAQs
GraphiteJS Framework
We found that @graphite/server 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.