Skip to content

Apollo Server 2: Remove formatParams#1331

Merged
evans merged 5 commits into
version-2from
server-2.0/remove-formatParams
Jul 13, 2018
Merged

Apollo Server 2: Remove formatParams#1331
evans merged 5 commits into
version-2from
server-2.0/remove-formatParams

Conversation

@evans

@evans evans commented Jul 11, 2018

Copy link
Copy Markdown
Contributor

This removes formatParams, because it is an internal implementation detail of the new Apollo Server as opposed to a first class functionality as in the middleware. It was originally used to implement a form of persisted queries, which is now unnecessary.

In the future, we are planning to move to a more extensible request pathway inside of Apollo Server that should provide the functionality that was originally provided by formatParams. If you are dependent on the behavior of formatParams, please open an issue and we can continue discussions there. In the meantime, the release candidate(rc.7) provides a stop-gap measure.

Comment thread docs/source/features/metrics.md Outdated
### High Level Logging

To log the inputs, response, and request, Apollo Server provides three methods: `formatParams`, `formatError`, and `formatResponse`. This example uses `console.log` to record the information, servers can use other more sophisticated tools.
To log the inputs, response, and request, Apollo Server provides three methods: `formatError` and `formatResponse`. This example uses `console.log` to record the information, servers can use other more sophisticated tools.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer have three methods, and no way to log the inputs with a simple callback.

Comment thread docs/source/migration-two-dot.md Outdated

<h2 id="log-function">Replacing `logFunction`</h2>

Apollo Server 2 removes the `logFunction` in favor of using `graphql-extensions`, which provides a more structured and flexible way of instrumenting Apollo Server. The explanation of how to do this more granular logging, can be found in the [metrics section](./features/metrics.html)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably note that extensions are not a public API yet at this point.

@evans evans merged commit 990d915 into version-2 Jul 13, 2018
@evans evans deleted the server-2.0/remove-formatParams branch July 13, 2018 16:44
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants