Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@fleekxyz/graphql
Advanced tools
Fleek Graphql is the service unifying all graphql service into once.
Fleek Graphql is the service unifying all graphql service into once.
Even though we are using Prisma, we write custom resolvers, mutations and queries. The examples of the mutations and queries are inside the ./src/resolvers directory and schema examples are located in ./src/schema directory.
Generally, this will be new functionality which will include creating a new schema. The schemas are based on the Pothos which are then used to get the data. This is used to resolve the relations such as project
or a zone
.
Step One:
Start by creating a file under ./src/schema
following CamelCase.ts
naming convention. At this point check the other files in the directory and how they are done, some are more complex than others, pick one like Domain Schema then copy/paste and adapt. Once you are done with adapting include a new file in the ./src/schema.ts
as it is done with other files.
Step Two:
The next step is to create a directory for mutations and queries. Create a directory inside the ./src/resolvers
following the camelCase
naming convention. Inside create mutations
and queries
directories. Each directory will contain an implementation file that export default
the mutationField
with the correct mutation name written in camelCase
and a callback function. Now it is time to create a test file. For the references check how other implementations are testing their mutations and queries. The tests are written
in a way that will cover as many as possible known cases.
Once you are done with adapting include a new file in the ./src/schema.ts
as it is done with other files.
Needed commands
# generate the client code
pnpm generate
# build the package
pnpm build
# test it. requires docker
pnpm test
# to test only failed tests,
# edit the test:watch command ( do not commit ) with correct path then execute it
pnpm test:watch
# start the mysql docker container
pnpm prepare:test
# or all together
pnpm generate && pnpm build && pnpm test
NodeJS as a runtime environment.
pnpm i
from root path..env
file as desired.pnpm dev
, and happy coding!pnpm prepare:test
or set up Mysql container manuallypnpm test
to run all unit & integration testsgit checkout -b my-new-feature
pnpm test
git commit -am 'Add some feature'
git push origin my-new-feature
FAQs
Fleek Graphql is the service unifying all graphql service into once.
The npm package @fleekxyz/graphql receives a total of 0 weekly downloads. As such, @fleekxyz/graphql popularity was classified as not popular.
We found that @fleekxyz/graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.