Files
cypress/packages/graphql
Bill Glesias af3839d990 misc: replace marionette-client with geckodriver as b2g marionette client is no longer supported (#30250)
* misc: replace marionette-client with geckodriver as b2g marionette client is no longer supported [run ci]

* install pump [run ci]

* refactor to have geckodriver launch the browser and split out webdriver to own class [run ci]

fix other failing tests [run ci]

fix other failing tests [run ci]

pass env variables to firefox

* fix sigkill / treekill issues on windows with firefox binary being a dangling process [run ci]

* fix issue where browser in headed mode was not starting maximized [run ci]

* stub firefox_spec added deps different to get type inference

* add comment to geckodriver patch

* move capabilities to verbose debug statement

* update changelog

* address comments from code review

* add pending for changelog

* update with suggestions from code review

* remove debug enable as the process needs to be bound to stderr and stdout

* add comment on why we need to bind

* add comments from code review

* address comments from code review

* make sure sessionId is set
2024-09-30 12:19:03 -04:00
..
2022-12-29 17:26:13 +00:00

GraphQL

The GraphQL layer that @packages/launchpad and @packages/app use to interact with @packages/server.

With the goal of type safety, several tools and abstractions are used. The technologies are:

  • nexus-graphql library for generating GraphQL schema using TypeScript objects
  • graphql-code-generator generate TypeScript types from gql queries (for front-end consuming the API)

This tutorial demonstrates how to build a type-safe GraphQL app using the above technologies. It's a good place to start, to learn how and why each tool is used.

Development

You will generally develop this in parallel with a front-end, in this case @packages/launchpad. Run yarn dev in @packages/launchpad and it will start up the GraphQL server. This also re-generates the graphql.schema file based on the declarations inside of entities.

Visit http://localhost:52200/graphql for the GraphiQL interface.

graphql

You can also develop in a test-driven manner using the tests.

  • yarn test-unit for the unit tests
  • yarn test-integration for the integration tests

Debugging

Logs available at cypress-verbose:graphql:* namespaces {fields,operation}