The mysqli construction approach has limited ability to define an SSL connection, but leveraging the procedural approach allows you to establish options prior to making a connection.
For example:
$mysqli = \mysqli_init();
// Reusing PDO keys for simplicity and commonality with the `mysql` driver
$mysqli->ssl_set(
$connection_options['pdo'][\PDO::MYSQL_ATTR_SSL_KEY],
$connection_options['pdo'][\PDO::MYSQL_ATTR_SSL_CERT],
$connection_options['pdo'][\PDO::MYSQL_ATTR_SSL_CA],
$connection_options['pdo'][\PDO::MYSQL_ATTR_SSL_CAPATH],
$connection_options['pdo'][\PDO::MYSQL_ATTR_SSL_CIPHER]
);
$mysqli->real_connect(
$connection_options['host'],
$connection_options['username'],
$connection_options['password'],
$connection_options['database'] ?? '',
!empty($connection_options['port']) ? (int) $connection_options['port'] : 3306,
$connection_options['unix_socket'] ?? '',
MYSQLI_CLIENT_SSL // This can likely be made through a connection option
);
Yeah, this works for me, I went back-and-forth on the Enum versus String but went the Enum route since it allow for input to be "fixed" to 2 options.
With that said, I would prefer to keep a value to just get the working copy in the event the revision id is not available. This helps logically with a decoupled frontend, for example:
// Next.js
const { isEnabled } = draftMode()
const query = gql`
query($id: String, $revision: String) {
node(id: $id, revision: $revision) {
....
}
}
`
await someGraphQLClient.query({
query,
variables: {
id,
revision: isEnabled ? 'working-copy' : ''
}
@almunnings I dont seem to have the ability to add a reviewer, but this MR is ready for review.
I have a similar request for support a `revision` in all queries - https://www.drupal.org/project/graphql_core_schema/issues/3437042 β¨ Support revision argument for all entity queries Active
I see that the `entityById` and `entityByUuid` are leverage the `entity_load` provided by the `drupal/graphql` module, could this functionality be exposed by a `entityByRevisionId` query?
Missed removing the `void` π€¦ββοΈ
Fixed patch with latest in 3.1.x-dev
Re-roll #2 patch for 3.1.x
Re-roll patch from #44 to be compatible with changes from issue #2869568
Our application ran into this issue. I created a patch based on the 3.1.x-dev branch and looks to be working