Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old GraphiQL JavaScript #2286

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions codeception.dist.yml
Expand Up @@ -20,8 +20,7 @@ coverage:
exclude:
- wp-graphql.php
- vendor/*
- src/Admin/GraphiQL/app/*
- src/Admin/GraphiQL/js/*
- packages/*
show_only_summary: false
extensions:
enabled:
Expand Down
1 change: 0 additions & 1 deletion composer.json
Expand Up @@ -96,7 +96,6 @@
"*.yml",
"!vendor/",
"plugin-build/",
"!src/Admin/GraphiQL/app/",
"node_modules/",
"!.wordpress-org/",
"docs/",
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication.md
Expand Up @@ -27,7 +27,7 @@ For remote HTTP requests to the `/graphql` endpoint, existing authentication plu
- https://github.com/WP-API/OAuth1 (labeled for use with the WP REST API, but works well with WPGraphQL)
- https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/ (For WordPress 5.6 and above)

If the remote request is within the WordPress admin, such as the WPGraphiQL plugin, you can use the existing Auth nonce as seen in action [here](https://github.com/wp-graphql/wp-graphiql/blob/master/assets/app/src/App.js#L16-L29).
If the remote request is within the WordPress admin, such as the WPGraphiQL plugin, you can use the existing Auth nonce as seen in action [here](https://github.com/wp-graphql/wp-graphiql/blob/master/packages/graphiql-auth-switch).

For non-remote requests (PHP function calls), if the context of the request is already authenticated, such as an Admin page in the WordPress dashboard, existing WordPress authentication can be used, taking advantage of the existing session. For example, if you wanted to use a GraphQL query to populate a dashboard page, you could send your query to the `do_graphql_request( $query )` function, and since the request is already authenticated, GraphQL will execute with the current user set, and will resolve fields that the users has permission to resolve.

Expand Down
2 changes: 1 addition & 1 deletion docs/security.md
Expand Up @@ -59,7 +59,7 @@ For remote HTTP requests to the `/graphql` endpoint, existing authentication plu
- https://github.com/WP-API/Basic-Auth (even though it’s labeled for the REST API, it works well with WPGraphQL – but not recommended for non-SSL connections)
- https://github.com/WP-API/OAuth1 (labeled for use with the WP REST API, but works well with WPGraphQL)

If the remote request is within the WordPress admin, such as the WPGraphiQL plugin, you can use the existing Auth nonce as seen in action [here](https://github.com/wp-graphql/wp-graphiql/blob/master/assets/app/src/App.js#L16-L29).
If the remote request is within the WordPress admin, such as the WPGraphiQL plugin, you can use the existing Auth nonce as seen in action [here](https://github.com/wp-graphql/wp-graphiql/blob/master/packages/graphiql-auth-switch).

For non-remote requests (PHP function calls), if the context of the request is already authenticated, such as an Admin page in the WordPress dashboard, existing WordPress authentication can be used, taking advantage of the existing session. For example, if you wanted to use a GraphQL query to populate a dashboard page, you could send your query to the `do_graphql_request( $query )` function, and since the request is already authenticated, GraphQL will execute with the current user set, and will resolve fields that the users has permission to resolve.

Expand Down
19 changes: 0 additions & 19 deletions src/Admin/GraphiQL/app/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions src/Admin/GraphiQL/app/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions src/Admin/GraphiQL/app/build/asset-manifest.json

This file was deleted.

1 change: 0 additions & 1 deletion src/Admin/GraphiQL/app/build/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions src/Admin/GraphiQL/app/build/static/css/2.8d9709c7.chunk.css

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/Admin/GraphiQL/app/build/static/js/2.218c6839.chunk.js

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/Admin/GraphiQL/app/build/static/js/main.97617add.chunk.js

This file was deleted.

This file was deleted.

This file was deleted.